Skip to content

Commit

Permalink
api: catch boolean values for init_columns
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaume committed Dec 7, 2021
1 parent f846d6e commit 09fb0fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mpcontribs-api/mpcontribs/api/projects/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def visit(path, key, value):
# pull out units
if isinstance(value, dict) and "unit" in value:
return key, value["unit"]
elif isinstance(value, str) and key not in quantity_keys:
elif isinstance(value, (str, bool)) and key not in quantity_keys:
return key, None

return True
Expand Down

0 comments on commit 09fb0fa

Please sign in to comment.