Removed unused opts argument from admin's get_deleted_objects().

Unused since e12b3199d0.
This commit is contained in:
Tim Graham 2018-02-21 13:32:13 -05:00
parent a94fd8a8d9
commit 16436f3751
3 changed files with 6 additions and 4 deletions

View File

@ -33,7 +33,8 @@ def delete_selected(modeladmin, request, queryset):
# Populate deletable_objects, a data structure of all related objects that
# will also be deleted.
deletable_objects, model_count, perms_needed, protected = get_deleted_objects(
queryset, opts, request.user, modeladmin.admin_site, using)
queryset, request.user, modeladmin.admin_site, using,
)
# The user has already confirmed the deletion.
# Do the deletion and return None to display the change list view again.

View File

@ -1754,8 +1754,9 @@ class ModelAdmin(BaseModelAdmin):
# Populate deleted_objects, a data structure of all related objects that
# will also be deleted.
(deleted_objects, model_count, perms_needed, protected) = get_deleted_objects(
[obj], opts, request.user, self.admin_site, using)
deleted_objects, model_count, perms_needed, protected = get_deleted_objects(
[obj], request.user, self.admin_site, using,
)
if request.POST and not protected: # The user has confirmed the deletion.
if perms_needed:

View File

@ -117,7 +117,7 @@ def flatten_fieldsets(fieldsets):
return field_names
def get_deleted_objects(objs, opts, user, admin_site, using):
def get_deleted_objects(objs, user, admin_site, using):
"""
Find all objects related to ``objs`` that should also be deleted. ``objs``
must be a homogeneous iterable of objects (e.g. a QuerySet).