# HG changeset patch # User Thierry Florac # Date 1528273908 -7200 # Node ID bfc376efd87c00b184bab325e0784fe45884cb6a # Parent a3df1b69616bffc5cd967df5f4dbdbdebaa4b290 Removed associations checks diff -r a3df1b69616b -r bfc376efd87c src/pyams_content/component/paragraph/video.py --- a/src/pyams_content/component/paragraph/video.py Wed Jun 06 10:25:52 2018 +0200 +++ b/src/pyams_content/component/paragraph/video.py Wed Jun 06 10:31:48 2018 +0200 @@ -21,11 +21,9 @@ VIDEO_PARAGRAPH_RENDERERS from pyams_content.features.checker.interfaces import IContentChecker, MISSING_VALUE, MISSING_LANG_VALUE from pyams_i18n.interfaces import II18nManager, INegotiator, II18n -from zope.lifecycleevent.interfaces import IObjectAddedEvent, IObjectModifiedEvent # import packages from pyams_content.component.paragraph import BaseParagraph, BaseParagraphContentChecker, BaseParagraphFactory -from pyams_content.component.paragraph.html import check_associations from pyams_content.features.renderer import RenderersVocabulary from pyams_file.property import FileProperty from pyams_utils.adapter import adapter_config @@ -33,7 +31,6 @@ from pyams_utils.registry import utility_config, get_utility from pyams_utils.traversing import get_parent from pyams_utils.vocabulary import vocabulary_config -from pyramid.events import subscriber from zope.interface import implementer from zope.schema.fieldproperty import FieldProperty @@ -63,22 +60,6 @@ content_type = VideoParagraph -@subscriber(IObjectAddedEvent, context_selector=IVideoParagraph) -def handle_added_video_paragraph(event): - """Check for new associations from added paragraph""" - paragraph = event.object - for lang, body in (paragraph.body or {}).items(): - check_associations(paragraph, body, lang, notify=False) - - -@subscriber(IObjectModifiedEvent, context_selector=IVideoParagraph) -def handle_modified_video_paragraph(event): - """Check for new associations from modified paragraph""" - paragraph = event.object - for lang, body in (paragraph.body or {}).items(): - check_associations(paragraph, body, lang, notify=False) - - @adapter_config(context=IVideoParagraph, provides=IContentChecker) class VideoParagraphContentChecker(BaseParagraphContentChecker): """Video paragraph content checker"""