Updated logos paragraph content checker
authorThierry Florac <tflorac@ulthar.net>
Wed, 10 Jul 2019 14:35:54 +0200
changeset 1329 5b3909c566e2
parent 1328 6f8aa24ab286
child 1330 cad3e22cc2bd
Updated logos paragraph content checker
src/pyams_content/shared/logo/paragraph.py
--- a/src/pyams_content/shared/logo/paragraph.py	Fri Jun 28 18:21:46 2019 +0200
+++ b/src/pyams_content/shared/logo/paragraph.py	Wed Jul 10 14:35:54 2019 +0200
@@ -83,13 +83,13 @@
                     output.append(translate(MISSING_VALUE).format(field=field_title))
                 else:
                     output.append(translate(MISSING_LANG_VALUE).format(field=field_title, lang=lang))
-        field_title = translate(ILogosParagraph['references'].title)
-        if not self.context.references:
+        field_title = translate(ILogosParagraph['logos'].title)
+        if not self.context.logos:
             output.append(translate(ERROR_VALUE).format(
                 field=field_title,
                 message=translate(_("no selected logo"))))
         else:
-            for reference, target in self.context.get_targets(with_reference=True):
+            for reference, target in self.context.get_logos(with_reference=True):
                 if target is None:
                     output.append(translate(ERROR_VALUE).format(
                         field=field_title,