1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Update options.py

Fix linting issues
This commit is contained in:
Mike J 2023-05-15 12:21:09 -06:00 committed by GitHub
parent e78888af22
commit d803ddcff9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -250,9 +250,7 @@ class BaseModelAdmin(metaclass=forms.MediaDefiningClass):
if related_admin is not None: if related_admin is not None:
ordering = related_admin.get_ordering(request) ordering = related_admin.get_ordering(request)
if ordering is not None and ordering != (): if ordering is not None and ordering != ():
return related_admin.get_queryset(request).order_by( return related_admin.get_queryset(request).order_by(*ordering)
*ordering
)
return None return None
def formfield_for_foreignkey(self, db_field, request, **kwargs): def formfield_for_foreignkey(self, db_field, request, **kwargs):