mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
refactor
This commit is contained in:
parent
1794fb8865
commit
bc79778639
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user