From 3e36f5b7a3f288d96d82961aecd4a2a34e8ac74f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Tue, 13 Jun 2017 18:58:48 +0200 Subject: [PATCH] fix comparing wrapped model instances --- src/c3nav/editor/wrappers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/c3nav/editor/wrappers.py b/src/c3nav/editor/wrappers.py index e4f69aa5..7a49f53b 100644 --- a/src/c3nav/editor/wrappers.py +++ b/src/c3nav/editor/wrappers.py @@ -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):