X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/9308d78c7f1e4d2a4faf3b98d1b24c262f3b6287..ff9cf41fc82917f82e95d99eae1dd0077c1fa32b:/forum/actions/meta.py diff --git a/forum/actions/meta.py b/forum/actions/meta.py index ccdaa75..f5c12cd 100644 --- a/forum/actions/meta.py +++ b/forum/actions/meta.py @@ -133,18 +133,16 @@ class AcceptAnswerAction(ActionProxy): self.repute(self.node.author, int(settings.REP_GAIN_BY_ACCEPTED)) def process_action(self): - self.node.parent.extra_ref = self.node - self.node.parent.save() self.node.marked = True self.node.nstate.accepted = self self.node.save() + self.node.question.reset_accepted_count_cache() def cancel_action(self): - self.node.parent.extra_ref = None - self.node.parent.save() self.node.marked = False self.node.nstate.accepted = None self.node.save() + self.node.question.reset_accepted_count_cache() def describe(self, viewer=None): answer = self.node