diff options
Diffstat (limited to 'django/contrib/postgres')
| -rw-r--r-- | django/contrib/postgres/constraints.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/django/contrib/postgres/constraints.py b/django/contrib/postgres/constraints.py index 2fcb076ecf..67e415ddcf 100644 --- a/django/contrib/postgres/constraints.py +++ b/django/contrib/postgres/constraints.py @@ -89,13 +89,14 @@ class ExclusionConstraint(BaseConstraint): return path, args, kwargs def __eq__(self, other): - return ( - isinstance(other, self.__class__) and - self.name == other.name and - self.index_type == other.index_type and - self.expressions == other.expressions and - self.condition == other.condition - ) + if isinstance(other, self.__class__): + return ( + self.name == other.name and + self.index_type == other.index_type and + self.expressions == other.expressions and + self.condition == other.condition + ) + return super().__eq__(other) def __repr__(self): return '<%s: index_type=%s, expressions=%s%s>' % ( |
