shamikbose89 commited on
Commit
2fe7b61
1 Parent(s): d2eb160

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -11,8 +11,8 @@ def string_to_int(size_str: str):
11
  size = float(size)
12
  except ValueError:
13
  raise ValidationException("The numbers cannot be converted into a float")
14
- if suffix not in list[mappings.keys()] and (int(suffix)<48 or int(suffix)>57) :
15
- raise ValidationException(f"The suffix is not valid. It can only be one of {list[mappings.keys()]}")
16
  return size * mappings[suffix]
17
 
18
  def int_to_string(size: int, precision=2):
 
11
  size = float(size)
12
  except ValueError:
13
  raise ValidationException("The numbers cannot be converted into a float")
14
+ if suffix not in list(mappings.keys()) and (int(suffix)<48 or int(suffix)>57) :
15
+ raise ValidationException(f"The suffix is not valid. It can only be one of {list(mappings.keys())}")
16
  return size * mappings[suffix]
17
 
18
  def int_to_string(size: int, precision=2):