Updated test
authorThierry Florac <thierry.florac@onf.fr>
Fri, 09 Feb 2018 16:53:00 +0100
changeset 390 beac02490657
parent 389 51377db3e723
child 391 6cd4434612f5
Updated test
src/pyams_content/shared/form/__init__.py
--- a/src/pyams_content/shared/form/__init__.py	Fri Feb 09 16:49:37 2018 +0100
+++ b/src/pyams_content/shared/form/__init__.py	Fri Feb 09 16:53:00 2018 +0100
@@ -89,8 +89,8 @@
 
     def inner_check(self, request):
         output = super(WfFormContentChecker, self).inner_check(request)
-        translate = request.localizer.translate
         if not IFormFieldContainer(self.context).get_fields():
+            translate = request.localizer.translate
             output.append(translate(ERROR_VALUE).format(field=translate(_("Form fields")),
                                                         message=translate(_("no field defined"))))
         return output