OrderChangeManager: Deal with unlimited quotas correctly

This commit is contained in:
Raphael Michel
2016-09-26 14:13:33 +02:00
parent 2a8bbb9952
commit 68987970bf
2 changed files with 9 additions and 1 deletions

View File

@@ -457,7 +457,7 @@ class OrderChangeManager:
if diff <= 0:
continue
avail = quota.availability()
if avail[0] != Quota.AVAILABILITY_OK or avail[1] < diff:
if avail[0] != Quota.AVAILABILITY_OK or (avail[1] is not None and avail[1] < diff):
raise OrderError(self.error_messages['quota'].format(name=quota.name))
def _check_free_to_paid(self):