Merge branch 'scenarios' of gitlab.com:pamhyr/pamhyr2 into scenarios

This commit is contained in:
parouby committed 2025-09-30 13:57:09 +02:00
commit d222842313
15 files changed
+230 -75

No files matched your search

+21 -20
View File
@@ -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)