Fixed: Image can't be copied with clipboad cms
@@ -129,11 +129,9 @@ class BootstrapImagePlugin(ImageAnnotationMixin, LinkPluginBase):
def sanitize_model(cls, obj):
sanitized = False
parent = obj.parent
+ if parent:
while parent.plugin_type != 'BootstrapColumnPlugin':
parent = parent.parent
- if parent is None:
- logger.warning("ImagePlugin(pk={}) has no ColumnPlugin as ancestor.".format(obj.pk))
- return
grid_column = parent.get_bound_plugin().get_grid_instance()
min_max_bounds = grid_column.get_min_max_bounds()
if obj.glossary.get('column_bounds') != min_max_bounds:
@@ -145,6 +143,9 @@ class BootstrapImagePlugin(ImageAnnotationMixin, LinkPluginBase):
if obj.glossary['media_queries'].get(bp.name) != media_query:
obj.glossary['media_queries'][bp.name] = media_query
sanitized = True
+ else:
+ logger.warning("ImagePlugin(pk={}) has no ColumnPlugin as ancestor.".format(obj.pk))
+ return
return sanitized
plugin_pool.register_plugin(BootstrapImagePlugin)
