Added missing __hash__ methods in _Object and Category.
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 12 Jul 2004 22:19:03 +0000 (22:19 +0000)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 12 Jul 2004 22:19:03 +0000 (22:19 +0000)
src/lib/kofoto/shelf.py

index 9fdd742..794420e 100644 (file)
@@ -1459,6 +1459,10 @@ class Category:
         return not obj == self
 
 
+    def __hash__(self):
+        return self.getId()
+
+
 class _Object:
     ##############################
     # Public methods.
@@ -1646,6 +1650,10 @@ class _Object:
         return not obj == self
 
 
+    def __hash__(self):
+        return self.getId()
+
+
 class Album(_Object):
     """Base class of Kofoto albums."""