mirror of https://gitlab.com/pamhyr/pamhyr2
Compare commits
No commits in common. "1e2a123693fe4ae10f306165164a3ddb87b7c808" and "37963b7b218b7dae221f3d6f525036112459125c" have entirely different histories.
1e2a123693
...
37963b7b21
|
|
@ -202,23 +202,6 @@ class SQLSubModel(PamhyrID):
|
|||
self._owner_scenario = self._status.scenario_id
|
||||
self._status.modified()
|
||||
|
||||
def set_owner_scenario_if(self, predicate):
|
||||
"""Set study status the object owner_scenario to current
|
||||
scenario if predicate(scenario_id) is true
|
||||
|
||||
Args:
|
||||
predicate: Function predicate on owner_scenario id
|
||||
|
||||
Returns:
|
||||
Nothing
|
||||
"""
|
||||
if self._status is None:
|
||||
return
|
||||
|
||||
if predicate(self._owner_scenario):
|
||||
self._owner_scenario = self._status.scenario_id
|
||||
self._status.modified()
|
||||
|
||||
def is_deleted(self):
|
||||
"""This object is deleted?
|
||||
|
||||
|
|
|
|||
|
|
@ -82,20 +82,5 @@ class PamhyrModelDict(SQLSubModel):
|
|||
self.set(key, new)
|
||||
return new
|
||||
|
||||
def rec_set_owner_scenario_if(self, predicate):
|
||||
"""Set study status the object owner_scenario to current
|
||||
scenario if predicate(scenario_id) is true
|
||||
|
||||
Args:
|
||||
predicate: Function predicate on owner_scenario id
|
||||
|
||||
Returns:
|
||||
Nothing
|
||||
"""
|
||||
self.set_owner_scenario_if(predicate)
|
||||
|
||||
for k in self._lst:
|
||||
self._dict[key].set_owner_scenario_if(predicate)
|
||||
|
||||
def new(self, key):
|
||||
raise NotImplementedMethodeError(self, self.new)
|
||||
|
|
|
|||
|
|
@ -85,21 +85,6 @@ class PamhyrModelList(SQLSubModel):
|
|||
if self._status is not None:
|
||||
self._status.modified()
|
||||
|
||||
def rec_set_owner_scenario_if(self, predicate):
|
||||
"""Set study status the object owner_scenario to current
|
||||
scenario if predicate(scenario_id) is true
|
||||
|
||||
Args:
|
||||
predicate: Function predicate on owner_scenario id
|
||||
|
||||
Returns:
|
||||
Nothing
|
||||
"""
|
||||
self.set_owner_scenario_if(predicate)
|
||||
|
||||
for el in self._lst:
|
||||
el.set_owner_scenario_if(predicate)
|
||||
|
||||
def new(self, index):
|
||||
"""Create new elements and add it to list
|
||||
|
||||
|
|
|
|||
|
|
@ -90,21 +90,6 @@ class PamhyrModelList(SQLSubModel):
|
|||
if self._status is not None:
|
||||
self._status.modified()
|
||||
|
||||
def rec_set_owner_scenario_if(self, predicate):
|
||||
"""Set study status the object owner_scenario to current
|
||||
scenario if predicate(scenario_id) is true
|
||||
|
||||
Args:
|
||||
predicate: Function predicate on owner_scenario id
|
||||
|
||||
Returns:
|
||||
Nothing
|
||||
"""
|
||||
self.set_owner_scenario_if(predicate)
|
||||
|
||||
for el in self._lst:
|
||||
el.set_owner_scenario_if(predicate)
|
||||
|
||||
def new(self, index):
|
||||
"""Create new elements and add it to list
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue