Simplify chained comparison
Change-Id: Ibcf2ba7fb96ace3e575681cd6db413fb37924c82 Implements: fix a bug Closes-Bug: #1608553
This commit is contained in:
parent
f9ba1ecc2f
commit
42ac50b4b0
@ -101,7 +101,7 @@ class UpdateProjectQuotaAction(ProjectQuotaAction):
|
||||
bad_values = []
|
||||
for key, value in cleaned_data.items():
|
||||
used = usages[key].get('used', 0)
|
||||
if value is not None and value >= 0 and used > value:
|
||||
if value is not None and 0 <= value < used:
|
||||
bad_values.append(_('%(used)s %(key)s used') %
|
||||
{'used': used,
|
||||
'key': quotas.QUOTA_NAMES.get(key, key)})
|
||||
|
Loading…
x
Reference in New Issue
Block a user