mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Merge branch 'scenarios' of gitlab.com:pamhyr/pamhyr2 into scenarios
This commit is contained in:
commit
d222842313
15 files changed
+230
-75
No files matched your search
@@ -426,30 +426,31 @@ class SedimentLayer(SQLSubModel):
|
||||
f"AND pamhyr_id NOT IN ({', '.join(map(str, loaded))}) "
|
||||
)
|
||||
|
||||
for row in table:
|
||||
it = iter(row)
|
||||
if table is not None:
|
||||
for row in table:
|
||||
it = iter(row)
|
||||
|
||||
pid = next(it)
|
||||
deleted = (next(it) == 1)
|
||||
name = next(it)
|
||||
comment = next(it)
|
||||
owner_scenario = next(it)
|
||||
pid = next(it)
|
||||
deleted = (next(it) == 1)
|
||||
name = next(it)
|
||||
comment = next(it)
|
||||
owner_scenario = next(it)
|
||||
|
||||
sl = cls(
|
||||
id=pid,
|
||||
name=name,
|
||||
comment=comment,
|
||||
status=data['status'],
|
||||
owner_scenario=owner_scenario
|
||||
)
|
||||
if deleted:
|
||||
sl.set_as_deleted()
|
||||
sl = cls(
|
||||
id=pid,
|
||||
name=name,
|
||||
comment=comment,
|
||||
status=data['status'],
|
||||
owner_scenario=owner_scenario
|
||||
)
|
||||
if deleted:
|
||||
sl.set_as_deleted()
|
||||
|
||||
data["sl"] = sl
|
||||
sl._layers = Layer._db_load(execute, data)
|
||||
data["sl"] = sl
|
||||
sl._layers = Layer._db_load(execute, data)
|
||||
|
||||
loaded.add(pid)
|
||||
new.append(sl)
|
||||
loaded.add(pid)
|
||||
new.append(sl)
|
||||
|
||||
data["scenario"] = scenario.parent
|
||||
new += cls._db_load(execute, data)
|
||||
|
||||
Reference in new issue
Block a user