misc: use NULL to store empty string field option (#32748)

This commit is contained in:
Frédéric Péters 2019-05-02 15:01:03 +02:00
parent dfa55d91a1
commit 3460f300f9
1 changed files with 3 additions and 1 deletions

View File

@ -774,8 +774,10 @@ class WcsFormdefFeeder(object):
# map items to sql id
if field.items or field.options:
v = self.items_mappings[field.varname].get(raw)
elif raw:
v = self.get_item_id(field, raw)
else:
v = raw and self.get_item_id(field, raw)
v = None
elif field.type in ('string', 'bool'):
v = raw