allow decimal points in quotas
This commit is contained in:
parent
3840443159
commit
c5c7de8b2b
|
@ -351,9 +351,9 @@ def validate_quota(quota):
|
|||
|
||||
if quota == "":
|
||||
raise ValueError("No quota provided.")
|
||||
if re.search(r"[\s,.]", quota):
|
||||
if re.search(r"[\s,]", quota):
|
||||
raise ValueError("Quotas cannot contain spaces or commas.")
|
||||
if not re.match(r'^\d+[GM]?$', quota):
|
||||
if not re.match(r'^[\d\.]+[GM]?$', quota):
|
||||
raise ValueError("Invalid quota.")
|
||||
|
||||
return quota
|
||||
|
|
Loading…
Reference in New Issue