mirror of https://gitlab.com/pamhyr/pamhyr2
Results: Fix results_data delete.
parent
de7f3e63b1
commit
ff9d25412c
|
|
@ -193,7 +193,8 @@ class Results(SQLSubModel):
|
|||
f"AND solver_type = '{solver_type}'"
|
||||
)
|
||||
if len(old_pid) != 0:
|
||||
old_pid = old_pid[0]
|
||||
for pid in old_pid:
|
||||
pid = pid[0]
|
||||
|
||||
execute(
|
||||
"DELETE FROM results " +
|
||||
|
|
@ -203,7 +204,7 @@ class Results(SQLSubModel):
|
|||
execute(
|
||||
"DELETE FROM results_data " +
|
||||
f"WHERE scenario = {self._owner_scenario} " +
|
||||
f"AND results = '{old_pid}'"
|
||||
f"AND result = {pid}"
|
||||
)
|
||||
|
||||
def _db_save(self, execute, data=None):
|
||||
|
|
|
|||
Loading…
Reference in New Issue