Skip to content

Commit fae9306

Browse files
committed
Allow zero tb allocations, but not None
1 parent 3c67487 commit fae9306

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

coldfront/plugins/ifx/calculator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,9 +401,9 @@ def get_allocation_tb(self, allocation):
401401
:rtype: `~decimal.Decimal`
402402
'''
403403
allocation_size_tb = allocation.get_attribute(self.STORAGE_QUOTA_ATTRIBUTE)
404-
if not allocation_size_tb:
404+
if allocation_size_tb is None:
405405
allocation_size_tb = allocation.get_attribute(self.OTHER_STORAGE_QUOTA_ATTRIBUTE)
406-
if not allocation_size_tb:
406+
if allocation_size_tb is None:
407407
raise Exception(f'Allocation {allocation.id} ({allocation.get_resources_as_string} for {allocation.project.title}) does not have the {self.STORAGE_QUOTA_ATTRIBUTE} attribute or the {self.OTHER_STORAGE_QUOTA_ATTRIBUTE} attribute set.')
408408
return Decimal(allocation_size_tb)
409409

0 commit comments

Comments
 (0)