Merge "Simplify chained comparison"

This commit is contained in:
Jenkins 2016-11-17 09:15:43 +00:00 committed by Gerrit Code Review
commit 11fbb4df2d
1 changed files with 1 additions and 1 deletions

View File

@ -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)})