]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/models/node.py
Fix error reported at http://meta.osqa.net/question/1660/just-been-awarded-student...
[osqa.git] / forum / models / node.py
index a7e122ec509930e1039b135ebf2074742da6fa8a..3150e992e0d915e7836a3c90707ad87998573394 100644 (file)
@@ -166,12 +166,15 @@ class Node(BaseModel, NodeContent):
     def summary(self):\r
         return strip_tags(self.html)[:300]\r
 \r
-    def update_last_activity(self, user):\r
+    def update_last_activity(self, user, save=False):\r
         self.last_activity_by = user\r
         self.last_activity_at = datetime.datetime.now()\r
 \r
         if self.parent:\r
-            self.parent.update_last_activity(user)\r
+            self.parent.update_last_activity(user, save=True)\r
+\r
+        if save:\r
+            self.save()\r
 \r
     def _create_revision(self, user, number, **kwargs):\r
         revision = NodeRevision(author=user, revision=number, node=self, **kwargs)\r