From 3eaba13a476c14b75429ba34180184b81997b33a Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Tue, 15 Mar 2022 16:13:28 +0100 Subject: [PATCH] Removed unnecessary _connector from Q construction in get_for_models(). Q._connector defaults to Q.AND. Follow up to 859a87d873ce7152af73ab851653b4e1c3ffea4c. --- django/contrib/contenttypes/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/contrib/contenttypes/models.py b/django/contrib/contenttypes/models.py index b83c9afcae..0c1c640072 100644 --- a/django/contrib/contenttypes/models.py +++ b/django/contrib/contenttypes/models.py @@ -82,7 +82,7 @@ class ContentTypeManager(models.Manager): # Lookup required content types from the DB. condition = Q( *( - Q(("app_label", app_label), ("model__in", models), _connector=Q.AND) + Q(("app_label", app_label), ("model__in", models)) for app_label, models in needed_models.items() ), _connector=Q.OR,