Skip to content

Commit

Permalink
use q._magnitude explicitly
Browse files Browse the repository at this point in the history
avoid boolean casting for offset units (temperature)
  • Loading branch information
tschaume committed May 6, 2024
1 parent b824569 commit df215a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mpcontribs-api/mpcontribs/api/contributions/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def make_quantities(path, key, value):

# parse as quantity
q = get_quantity(str_value)
if not q:
if not q._magnitude:
return key, value

# silently ignore "nan"
Expand Down

0 comments on commit df215a0

Please sign in to comment.