]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/models/node.py
Fixes OSQA 348, Last seen field is not updated.
[osqa.git] / forum / models / node.py
index 70d10b647c2dfa2da162491dc4a616e7660e1fbb..75b39339e3284d74e913f60d99e80fa35a7b8d21 100644 (file)
@@ -95,7 +95,12 @@ class NodeQuerySet(CachedQuerySet):
             return super(NodeQuerySet, self).obj_from_datadict(datadict)
 
     def get(self, *args, **kwargs):
-        return super(NodeQuerySet, self).get(*args, **kwargs).leaf
+        node = super(NodeQuerySet, self).get(*args, **kwargs).leaf
+
+        if not isinstance(node, self.model):
+            raise self.model.DoesNotExist()
+
+        return node
 
     def filter_state(self, **kwargs):
         apply_bool = lambda q, b: b and q or ~q