]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/actions/meta.py
now superusers and staff can unsubscribe users subscription.
[osqa.git] / forum / actions / meta.py
index ccdaa75f390396d09b2687b95e1277f3b450e9b9..f5c12cdcc038449e40cc55a2c277c576177526b4 100644 (file)
@@ -133,18 +133,16 @@ class AcceptAnswerAction(ActionProxy):
             self.repute(self.node.author, int(settings.REP_GAIN_BY_ACCEPTED))\r
 \r
     def process_action(self):\r
-        self.node.parent.extra_ref = self.node\r
-        self.node.parent.save()\r
         self.node.marked = True\r
         self.node.nstate.accepted = self\r
         self.node.save()\r
+        self.node.question.reset_accepted_count_cache()\r
 \r
     def cancel_action(self):\r
-        self.node.parent.extra_ref = None\r
-        self.node.parent.save()\r
         self.node.marked = False\r
         self.node.nstate.accepted = None\r
         self.node.save()\r
+        self.node.question.reset_accepted_count_cache()\r
 \r
     def describe(self, viewer=None):\r
         answer = self.node\r