We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5a6c2f commit 13ba956Copy full SHA for 13ba956
djangocms_form_builder/helpers.py
@@ -125,7 +125,10 @@ def add_plugin(placeholder, plugin):
125
126
def delete_plugin(plugin):
127
"""CMS version save function to delete a plugin (and its descendants) from a placeholder"""
128
- return plugin.placeholder.delete_plugin(plugin)
+ if hasattr(plugin.placeholder, "delete_plugin"): # CMS v4?
129
+ return plugin.placeholder.delete_plugin(plugin)
130
+ else: # CMS < v4
131
+ return plugin.delete()
132
133
134
def coerce_decimal(value):
0 commit comments