mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
REPLines: Add scenario support.
This commit is contained in:
1 parent
e43c20c1e6
commit
5e3dbc18c3
2 files changed
+49
-12
No files matched your search
@@ -19,7 +19,7 @@
|
||||
from tools import trace, timer
|
||||
|
||||
from Model.Except import NotImplementedMethodeError
|
||||
from Model.Tools.PamhyrList import PamhyrModelList
|
||||
from Model.Tools.PamhyrListExt import PamhyrModelList
|
||||
from Model.REPLine.REPLine import REPLine
|
||||
|
||||
|
||||
@@ -38,7 +38,10 @@ class REPLineList(PamhyrModelList):
|
||||
ok = True
|
||||
|
||||
# Delete previous data
|
||||
execute("DELETE FROM rep_lines")
|
||||
execute(
|
||||
"DELETE FROM rep_lines " +
|
||||
f"WHERE scenario = {self._status.scenario_id}"
|
||||
)
|
||||
|
||||
for af in self._lst:
|
||||
ok &= af._db_save(execute, data)
|
||||
|
||||
Reference in new issue
Block a user