From 04b15022e8d1f49af69d8a1e6cd678f31f1280ff Mon Sep 17 00:00:00 2001 From: roman_p Date: Thu, 17 Nov 2022 17:54:30 +0300 Subject: Fixed #26261 -- Fixed queryset crash when excluding reverse GenericRelation. Thanks Amir Hadi for the report. --- django/contrib/contenttypes/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django/contrib/contenttypes') diff --git a/django/contrib/contenttypes/fields.py b/django/contrib/contenttypes/fields.py index 72b9e7631a..35fcd0d908 100644 --- a/django/contrib/contenttypes/fields.py +++ b/django/contrib/contenttypes/fields.py @@ -461,7 +461,7 @@ class GenericRelation(ForeignObject): to_opts=opts, target_fields=(opts.pk,), join_field=self, - m2m=not self.unique, + m2m=False, direct=False, filtered_relation=filtered_relation, ) -- cgit v1.3