File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -99,16 +99,15 @@ def get_quota_on_date(self, now):
9999 Walks Provisions list to return the subscribed quota
100100 associated with the given date
101101 """
102- current_quantity = 0
103102 if self .state == self .SUBSCRIPTION_DEPLOYED :
104103 for provision in self .get_provisions ():
105104 for quantity in provision .get_quantities ():
106- if ( quantity .start_date <= now
107- and (quantity .end_date is None
108- or quantity .end_date >= now ) ):
109- current_quantity += quantity .quantity_gigabytes
105+ if quantity .start_date <= now :
106+ if (quantity .end_date is None
107+ or quantity .end_date >= now ):
108+ return quantity .quantity_gigabytes
110109
111- return current_quantity if current_quantity else None
110+ return None
112111
113112 def json_data (self ):
114113 return {
You can’t perform that action at this time.
0 commit comments