REPLines: Add scenario support.

This commit is contained in:
Pierre-Antoine Rouby committed 2024-09-06 14:19:58 +02:00
1 parent e43c20c1e6
commit 5e3dbc18c3
2 files changed
+49 -12

No files matched your search

+5 -2
View File
@@ -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)