mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Adists: Pollutants, BC: Fix update and save.
This commit is contained in:
1 parent
c64bcd1ff7
commit
0e1e3665a6
2 files changed
+5
-1
No files matched your search
@@ -403,6 +403,8 @@ class BoundaryConditionAdisTS(SQLSubModel):
|
|||||||
")"
|
")"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
data["bca"] = self
|
||||||
|
|
||||||
ind = 0
|
ind = 0
|
||||||
for d in self._data:
|
for d in self._data:
|
||||||
data["ind"] = ind
|
data["ind"] = ind
|
||||||
|
|||||||
@@ -335,8 +335,11 @@ class Pollutants(SQLSubModel):
|
|||||||
if not created:
|
if not created:
|
||||||
cls._db_update_to_0_2_0(execute, data)
|
cls._db_update_to_0_2_0(execute, data)
|
||||||
|
|
||||||
|
if not created:
|
||||||
return cls._update_submodel(execute, version, data)
|
return cls._update_submodel(execute, version, data)
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _db_update_to_0_2_0(cls, execute, data):
|
def _db_update_to_0_2_0(cls, execute, data):
|
||||||
table = "Pollutants"
|
table = "Pollutants"
|
||||||
@@ -372,7 +375,6 @@ class Pollutants(SQLSubModel):
|
|||||||
"SELECT pamhyr_id, deleted, name FROM pollutants " +
|
"SELECT pamhyr_id, deleted, name FROM pollutants " +
|
||||||
f"WHERE scenario = {scenario.id} " +
|
f"WHERE scenario = {scenario.id} " +
|
||||||
f"AND pamhyr_id NOT IN ({', '.join(map(str, loaded))})"
|
f"AND pamhyr_id NOT IN ({', '.join(map(str, loaded))})"
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if table is not None:
|
if table is not None:
|
||||||
|
|||||||
Reference in new issue
Block a user