Skip to content

Commit f8e634a

Browse files
committed
fix
1 parent 1fb3f00 commit f8e634a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

services/web/server/src/simcore_service_webserver/catalog_api_models.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ class CannotFormatUnitError(ValueError):
3030
def get_formatted_unit(data: dict):
3131
try:
3232
unit = data["unit"]
33+
if unit is None:
34+
raise CannotFormatUnitError()
3335
return FAKE_UNIT_TO_FORMATS[unit.upper()]
3436
except KeyError as err:
3537
raise CannotFormatUnitError() from err

0 commit comments

Comments
 (0)