mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Model: Tools: Prepare scenario duplication.
This commit is contained in:
1 parent
2916afb974
commit
1e2a123693
4 files changed
+45
-1
No files matched your search
@@ -82,5 +82,20 @@ 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)
|
||||
Reference in new issue
Block a user