fixed bug that caused TypeError: '<=' not supported between instances of 'NoneType' and 'int'

work related to Bug 3315 - make simpaweb django app a packageable application
This commit is contained in:
Guillaume Raffy 2023-05-23 12:10:29 +02:00
parent 654e449007
commit 7a5d32dec0
1 changed files with 2 additions and 1 deletions

View File

@ -29,7 +29,8 @@ class JobId:
"""
MAX_NUM_JOBS_IN_ARRAY = 1000000
def __init__( self, iJobId, iJobArrayElementId = None):
assert iJobArrayElementId <= self.MAX_NUM_JOBS_IN_ARRAY
if iJobArrayElementId is not None:
assert iJobArrayElementId <= self.MAX_NUM_JOBS_IN_ARRAY
self.m_iJobId = iJobId
self.m_iJobArrayElementId = iJobArrayElementId # None if this identifier does not refer to a job array element