1
0
mirror of https://github.com/django/django.git synced 2025-06-05 11:39:13 +00:00

Removed unnecessary _connector from Q construction in get_for_models().

Q._connector defaults to Q.AND.

Follow up to 859a87d873ce7152af73ab851653b4e1c3ffea4c.
This commit is contained in:
Mariusz Felisiak 2022-03-15 16:13:28 +01:00 committed by GitHub
parent be80aa55ec
commit 3eaba13a47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,7 +82,7 @@ class ContentTypeManager(models.Manager):
# Lookup required content types from the DB. # Lookup required content types from the DB.
condition = Q( 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() for app_label, models in needed_models.items()
), ),
_connector=Q.OR, _connector=Q.OR,