Skip to content

Commit

Permalink
catching another type of unit error
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrkarr committed Jan 13, 2020
1 parent b18d8e0 commit 2f71381
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion obj_tables/units.py
Expand Up @@ -113,7 +113,7 @@ def clean(self, value):
elif isinstance(value, str):
try:
value = self.registry.parse_units(value)
except pint.UndefinedUnitError:
except (pint.UndefinedUnitError, TypeError):
error = core.InvalidAttribute(self, ['Invalid unit {}'.format(value)])
else:
error = core.InvalidAttribute(self, ['Invalid unit {}'.format(value)])
Expand Down

0 comments on commit 2f71381

Please sign in to comment.