mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
fix duplication of same objects in db with when saving a child scenario
This commit is contained in:
1 parent
348417977d
commit
ccf3da114b
5 files changed
+17
-4
No files matched your search
@@ -274,6 +274,9 @@ class HydraulicStructure(SQLSubModel):
|
||||
return hs
|
||||
|
||||
def _db_save(self, execute, data=None):
|
||||
if not self.must_be_saved():
|
||||
return True
|
||||
|
||||
execute(
|
||||
"DELETE FROM hydraulic_structures " +
|
||||
f"WHERE pamhyr_id = {self.pamhyr_id} " +
|
||||
|
||||
Reference in new issue
Block a user