Commit 53a97617 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

added confirmation message to action after removal of schedules

parent b92a4d5a
Pipeline #2142 passed with stage
in 1 minute and 29 seconds
......@@ -20,9 +20,11 @@ class FacilityAdmin(admin.ModelAdmin):
Allows admins to create new facilities through the admin interface.
"""
def drop_special_schedules(modeladmin, request, queryset):
def drop_special_schedules(self, request, queryset):
num = queryset.count()
for facility in queryset:
facility.special_schedules.clear()
self.message_user(request, "Successfully removed special schedules from %d facilities." % num)
actions = [drop_special_schedules, ]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment