fix comparing wrapped model instances

This commit is contained in:
Laura Klünder 2017-06-13 18:58:48 +02:00
parent e3c8947883
commit 3e36f5b7a3

View file

@ -117,7 +117,7 @@ class ModelInstanceWrapper(BaseWrapper):
self._initial_values[field] = getattr(self._obj, field.name)
def __eq__(self, other):
if type(other) == ModelWrapper:
if isinstance(other, BaseWrapper):
if type(self._obj) is not type(other._obj): # noqa
return False
elif type(self._obj) is not type(other):