Commit 1392ab42 authored by panos's avatar panos

Assert inserted when part is not None

parent e6843375
...@@ -185,7 +185,6 @@ class Job(Entity): # inherits from the Entity c ...@@ -185,7 +185,6 @@ class Job(Entity): # inherits from the Entity c
if nextSequence==None or nextSequence=="": if nextSequence==None or nextSequence=="":
return True return True
else: else:
# print nextSequence
nextSequence = int(nextSequence) nextSequence = int(nextSequence)
# flag that decides if the entity can proceed to the next station in its route # flag that decides if the entity can proceed to the next station in its route
mayProceed=False mayProceed=False
...@@ -237,6 +236,7 @@ class Job(Entity): # inherits from the Entity c ...@@ -237,6 +236,7 @@ class Job(Entity): # inherits from the Entity c
for partID in requiredPartsIDs: for partID in requiredPartsIDs:
# find the objects with the corresponding IDs # find the objects with the corresponding IDs
part=findObjectById(partID) part=findObjectById(partID)
assert part!=None, 'the order Component just retrieved based on its ID cannot be None'
if not part in requiredParts: if not part in requiredParts:
requiredParts.append(part) requiredParts.append(part)
return requiredParts return requiredParts
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment