chore: Add wait_applying function call in plugins route in web UI

This commit is contained in:
Théophile Diot 2024-05-07 11:06:34 +02:00
parent f231d73d6f
commit f0af4bff3b
No known key found for this signature in database
GPG key ID: 248FEA4BAE400D06

View file

@ -1234,6 +1234,8 @@ def plugins():
if variables["type"] in ("core", "pro"):
return redirect_flash_error(f"Can't delete {variables['type']} plugin {variables['name']}", "plugins", True)
wait_applying()
plugins = app.config["CONFIG"].get_plugins(_type="external", with_data=True)
for x, plugin in enumerate(plugins):
if plugin["id"] == variables["name"]:
@ -1413,6 +1415,8 @@ def plugins():
if errors >= files_count:
return redirect(url_for("loading", next=url_for("plugins")))
wait_applying()
plugins = app.config["CONFIG"].get_plugins(_type="external", with_data=True)
for plugin in deepcopy(plugins):
if plugin["id"] in new_plugins_ids: