##// END OF EJS Templates
Post deletion when the thread is deleted is already handled by django. No need to implement it manually
neko259 -
r1226:e8ff96e4 default
parent child Browse files
Show More
@@ -194,16 +194,6 b' class Thread(models.Model):'
194
194
195 return self.get_opening_post().pub_time
195 return self.get_opening_post().pub_time
196
196
197 def delete(self, using=None):
198 """
199 Deletes thread with all replies.
200 """
201
202 for reply in self.get_replies().all():
203 reply.delete()
204
205 super(Thread, self).delete(using)
206
207 def __str__(self):
197 def __str__(self):
208 return 'T#{}/{}'.format(self.id, self.get_opening_post_id())
198 return 'T#{}/{}'.format(self.id, self.get_opening_post_id())
209
199
General Comments 0
You need to be logged in to leave comments. Login now