diff --git a/proteus/__init__.py b/proteus/__init__.py index 4af05d6e8b..49a29996ff 100644 --- a/proteus/__init__.py +++ b/proteus/__init__.py @@ -631,7 +631,8 @@ class Model(object): def __cmp__(self, other): 'Compare with other' if isinstance(other, Model): - return cmp(self.id, other.id) + return cmp((self.__class__.__name__, self.id), + (other.__class__.__name__, other.id)) if isinstance(other, (bool, NoneType)): return 1 raise NotImplementedError