Commit bd1f6d17 authored by Georgios Dagkakis's avatar Georgios Dagkakis

Fix so (sub)batch pass the id they get to the constractor of the parent Entity

parent 31e3c9cf
...@@ -33,7 +33,7 @@ class Batch(Entity): ...@@ -33,7 +33,7 @@ class Batch(Entity):
type="Batch" type="Batch"
def __init__(self, id, name, numberOfUnits=1): def __init__(self, id, name, numberOfUnits=1):
Entity.__init__(self, name=name) Entity.__init__(self, name=name, id=id)
self.numberOfUnits=numberOfUnits self.numberOfUnits=numberOfUnits
self.numberOfSubBatches=1 #integer that shows in how many sub batches is the batch broken self.numberOfSubBatches=1 #integer that shows in how many sub batches is the batch broken
self.subBatchList=[] #list that contains the sub-batches that this batch has been broken into self.subBatchList=[] #list that contains the sub-batches that this batch has been broken into
......
...@@ -32,7 +32,7 @@ class SubBatch(Entity): ...@@ -32,7 +32,7 @@ class SubBatch(Entity):
type="SubBatch" type="SubBatch"
def __init__(self, id, name, numberOfUnits=1, parentBatch=None): def __init__(self, id, name, numberOfUnits=1, parentBatch=None):
Entity.__init__(self, name=name) Entity.__init__(self, name=name, id=id)
self.numberOfUnits=numberOfUnits self.numberOfUnits=numberOfUnits
self.parentBatch=parentBatch self.parentBatch=parentBatch
self.batchId=parentBatch.id self.batchId=parentBatch.id
......
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