LC: Add scenario support.

This commit is contained in:
Pierre-Antoine Rouby committed 2024-09-17 16:14:06 +02:00
1 parent a2ff3ecd9a
commit c01effbf4c
13 files changed
+253 -120

No files matched your search

@@ -252,7 +252,7 @@ class BoundaryCondition(SQLSubModel):
cls._db_update_to_0_1_0(execute, data)
if major == "0" and minor == "1":
if release < 2:
if int(release) < 2:
execute(
"ALTER TABLE friction " +
"ADD COLUMN deleted BOOLEAN NOT NULL DEFAULT FALSE"
@@ -51,7 +51,7 @@ class BoundaryConditionList(PamhyrModelListWithTab):
def _db_save(self, execute, data=None):
execute(
"DELETE FROM boundary_condition "
"DELETE FROM boundary_condition " +
f"WHERE scenario = {self._status.scenario_id}"
)