forum: do not delete threads of promoted topics
Threads of promoted topics belong to the programs they were promoted into, so they shouldn't be deleted.
This commit is contained in:
parent
a6689312cf
commit
76f03be60f
|
@ -54,7 +54,8 @@ class Topic(Post):
|
|||
|
||||
def delete(self):
|
||||
"""Recursively delete topic and all associated contents."""
|
||||
self.thread.delete()
|
||||
if self.promotion is None:
|
||||
self.thread.delete()
|
||||
db.session.delete(self)
|
||||
|
||||
def __repr__(self):
|
||||
|
|
Loading…
Reference in New Issue