fix: Allow Yes, No, Y, N values for Check fields
This commit is contained in:
parent
50da7acba7
commit
d8a0b8cc53
1 changed files with 2 additions and 2 deletions
|
|
@ -351,9 +351,9 @@ class Importer:
|
|||
value = cstr(value)
|
||||
|
||||
# convert boolean values to 0 or 1
|
||||
if df.fieldtype == "Check" and value.lower().strip() in ["t", "f", "true", "false"]:
|
||||
if df.fieldtype == "Check" and value.lower().strip() in ["t", "f", "true", "false", "yes", "no", "y", "n"]:
|
||||
value = value.lower().strip()
|
||||
value = 1 if value in ["t", "true"] else 0
|
||||
value = 1 if value in ["t", "true", "y", "yes"] else 0
|
||||
|
||||
if df.fieldtype in ["Int", "Check"]:
|
||||
value = cint(value)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue