Skip to content

Commit 9372e7b

Browse files
committed
Fix: Allow multiple updates of components
1 parent a459a06 commit 9372e7b

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

djangocms_frontend/cms_plugins.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import annotations
22

33
from cms.plugin_pool import plugin_pool
4-
from django.core.exceptions import ImproperlyConfigured
54

65
from .ui_plugin_base import CMSUIPluginBase
76

@@ -14,7 +13,7 @@ def update_plugin_pool():
1413
from .component_pool import components
1514

1615
# Loop through the values in the components' registry
17-
for key, (_, plugin, slot_plugins) in components._registry.items():
16+
for _, plugin, slot_plugins in components._registry.values():
1817
if plugin.__name__ not in plugin_pool.plugins:
1918
# Add the plugin to the global namespace
2019
globals()[plugin.__name__] = plugin
@@ -29,14 +28,3 @@ def update_plugin_pool():
2928
if slot_plugin.__name__ not in plugin_pool.plugins:
3029
globals()[slot_plugin.__name__] = slot_plugin
3130
plugin_pool.register_plugin(slot_plugin)
32-
else:
33-
raise ImproperlyConfigured(
34-
f"Cannot register slot plugin {slot_plugin.__name__} "
35-
f"since a plugin {slot_plugin.__name__} is already registered "
36-
f"by {plugin_pool.plugins[slot_plugin.__name__].__module__}."
37-
)
38-
else:
39-
raise ImproperlyConfigured(
40-
f"Cannot register frontend component {key} since a plugin {plugin.__name__} "
41-
f"is already registered by {plugin_pool.plugins[plugin.__name__].__module__}."
42-
)

0 commit comments

Comments
 (0)