Procházet zdrojové kódy

Allowing None values in i18n dict

Yann Weber před 9 roky
rodič
revize
af34f4bf59
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1
    1
      EditorialModel/fieldtypes/i18n.py

+ 1
- 1
EditorialModel/fieldtypes/i18n.py Zobrazit soubor

@@ -24,7 +24,7 @@ class EmFieldType(MultiValueFieldType):
24 24
             return (value, None)
25 25
         if isinstance(value, dict):
26 26
             for val in value.values():
27
-                if not isinstance(val, str):
27
+                if not(isinstance(val, str) or val is None) :
28 28
                     return (None, ValueError("Expected str as dict values. Bad dict : '%s'" % value))
29 29
             return (value, None)
30 30
         if isinstance(value, str):

Loading…
Zrušit
Uložit