Added check for "deleted" value in I18n file field validation method
authorThierry Florac <thierry.florac@onf.fr>
Fri, 10 Nov 2017 13:27:53 +0100
changeset 42 a024de987b59
parent 41 6fc46816fc2d
child 43 5638c9cfb233
Added check for "deleted" value in I18n file field validation method
src/pyams_i18n/schema.py
--- a/src/pyams_i18n/schema.py	Fri Oct 13 10:20:41 2017 +0200
+++ b/src/pyams_i18n/schema.py	Fri Nov 10 13:27:53 2017 +0100
@@ -141,7 +141,7 @@
                     break
                 raise RequiredMissing
         for lang_value in value.values():
-            if lang_value is NOT_CHANGED:
+            if (lang_value is NOT_CHANGED) or (lang_value is DELETED_FILE):
                 return
             elif isinstance(lang_value, tuple):
                 try: