Skip to content

Commit

Permalink
Merge pull request #368 from romfabbro/quick_fix
Browse files Browse the repository at this point in the history
Quick fix: observation startDate when linkedfield
  • Loading branch information
romfabbro authored Nov 7, 2016
2 parents 2dd3a21 + 29d29ac commit 78ae379
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Back/ecoreleve_server/Models/Protocoles.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def SubObservation_childrens(self,listOfSubObs):
self.SubObservation_children = listSubValues

def UpdateFromJson(self,DTOObject,startDate = None):
ObjectWithDynProp.UpdateFromJson(self,DTOObject,startDate)
ObjectWithDynProp.UpdateFromJson(self,DTOObject,None)
if 'listOfSubObs' in DTOObject :
self.SubObservation_childrens = DTOObject['listOfSubObs']
self.updateLinkedField()
Expand All @@ -154,7 +154,7 @@ def GetFlatObject(self,schema=None):
typeName = 'children'
sub_ProtocoleType = None
if self.Observation_children != []:
### Append flatdata to list of data for existing subProto
### Append flatdata to list of data for existing subProto
typeName = self.Observation_children[0].GetType().Name
for subObs in self.Observation_children:
subObs.LoadNowValues()
Expand Down Expand Up @@ -201,7 +201,7 @@ class ObservationDynProp(Base):
class ProtocoleType(Base,ObjectTypeWithDynProp):

@orm.reconstructor
def init_on_load(self):
def init_on_load(self):
ObjectTypeWithDynProp.__init__(self)

__tablename__ = 'ProtocoleType'
Expand Down Expand Up @@ -242,4 +242,3 @@ class ObservationDynPropSubValue (Base):
FieldName = Column(String(250))
ValueNumeric = Column(Numeric(30,10))
FK_Observation = Column(Integer, ForeignKey('Observation.ID'))

0 comments on commit 78ae379

Please sign in to comment.