mirror of https://gitlab.com/pamhyr/pamhyr2
Results: Fix non valid results save.
parent
efa16837d8
commit
bd2fc22e96
|
|
@ -349,10 +349,16 @@ class Results(SQLSubModel):
|
|||
f"AND result = {pid}"
|
||||
)
|
||||
|
||||
def _is_valid(self):
|
||||
return "timestamps" in self._meta_data
|
||||
|
||||
def _db_save(self, execute, data=None):
|
||||
if self._status.scenario.id != self._owner_scenario:
|
||||
return True
|
||||
|
||||
if not self._is_valid():
|
||||
return False
|
||||
|
||||
pid = self._pamhyr_id
|
||||
if self._solver is None:
|
||||
solver_name = self.get("solver_name")
|
||||
|
|
|
|||
Loading…
Reference in New Issue