This commit is contained in:
Matthias 2021-11-16 00:14:44 +01:00
parent 1794fb8865
commit bc79778639
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -12,11 +12,11 @@ def plugin_update(queryset, new_status: bool):
apps_changed = False apps_changed = False
# run through all plugins in the queryset as the save method needs to be overridden # run through all plugins in the queryset as the save method needs to be overridden
for model in queryset: for plugin in queryset:
if model.active is not new_status: if plugin.active is not new_status:
model.active = new_status plugin.active = new_status
plugin.save(no_reload=True)
apps_changed = True apps_changed = True
model.save(no_reload=True)
# reload plugins if they changed # reload plugins if they changed
if apps_changed: if apps_changed: