From 042b381e2e37c0c37b8a8f6cc9947f1a2ebfa0dd Mon Sep 17 00:00:00 2001 From: John Parton Date: Tue, 5 Nov 2024 11:05:13 -0600 Subject: [PATCH] Refs #23968 -- Removed unnecessary list comprehension in contrib.admin.helpers. --- django/contrib/admin/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/contrib/admin/helpers.py b/django/contrib/admin/helpers.py index d28a382814..51450d1d9e 100644 --- a/django/contrib/admin/helpers.py +++ b/django/contrib/admin/helpers.py @@ -121,7 +121,7 @@ class Fieldset: @cached_property def is_collapsible(self): - if any([field in self.fields for field in self.form.errors]): + if any(field in self.fields for field in self.form.errors): return False return "collapse" in self.classes