feat: Refactor remove command to use querysets

This commit is contained in:
Cristian 2020-08-21 12:42:08 -05:00 committed by Cristian Vargas
parent be520d137a
commit a8ed72501d
5 changed files with 68 additions and 75 deletions

View file

@ -50,7 +50,7 @@ def verify_snapshots(modeladmin, request, queryset):
verify_snapshots.short_description = "Check"
def delete_snapshots(modeladmin, request, queryset):
remove(links=[snapshot.as_link() for snapshot in queryset], yes=True, delete=True, out_dir=OUTPUT_DIR)
remove(snapshots=queryset, yes=True, delete=True, out_dir=OUTPUT_DIR)
delete_snapshots.short_description = "Delete"