diff options
Diffstat (limited to 'django/db/models/query_utils.py')
-rw-r--r-- | django/db/models/query_utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/db/models/query_utils.py b/django/db/models/query_utils.py index 7a667814f4..189fb4fa44 100644 --- a/django/db/models/query_utils.py +++ b/django/db/models/query_utils.py @@ -309,8 +309,9 @@ class FilteredRelation: self.path = [] def __eq__(self, other): + if not isinstance(other, self.__class__): + return NotImplemented return ( - isinstance(other, self.__class__) and self.relation_name == other.relation_name and self.alias == other.alias and self.condition == other.condition |