mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-29 19:10:42 +01:00
Scenario: Clean DB add minimal comment.
This commit is contained in:
1 parent
42ea50d62e
commit
5ce94a63d3
1 file changed
+4
@@ -228,6 +228,8 @@ class Scenario(SQLSubModel):
|
||||
|
||||
for table in tables:
|
||||
if self.parent is None:
|
||||
# This scenario is the default scenario, so we can
|
||||
# delete all data marked as deleted
|
||||
execute(
|
||||
f"DELETE FROM {table} " +
|
||||
f"WHERE scenario = {self.id} " +
|
||||
@@ -235,6 +237,8 @@ class Scenario(SQLSubModel):
|
||||
)
|
||||
continue
|
||||
|
||||
# Select pamhyr_id for each deleted data in this scenario
|
||||
# who do not exists into parents scenarios
|
||||
ids = execute(
|
||||
f"""
|
||||
SELECT pamhyr_id FROM {table}
|
||||
|
||||
Reference in new issue
Block a user