mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Results: Fix non valid results save.
This commit is contained in:
1 parent
efa16837d8
commit
bd2fc22e96
1 file changed
+6
@@ -349,10 +349,16 @@ class Results(SQLSubModel):
|
|||||||
f"AND result = {pid}"
|
f"AND result = {pid}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def _is_valid(self):
|
||||||
|
return "timestamps" in self._meta_data
|
||||||
|
|
||||||
def _db_save(self, execute, data=None):
|
def _db_save(self, execute, data=None):
|
||||||
if self._status.scenario.id != self._owner_scenario:
|
if self._status.scenario.id != self._owner_scenario:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
if not self._is_valid():
|
||||||
|
return False
|
||||||
|
|
||||||
pid = self._pamhyr_id
|
pid = self._pamhyr_id
|
||||||
if self._solver is None:
|
if self._solver is None:
|
||||||
solver_name = self.get("solver_name")
|
solver_name = self.get("solver_name")
|
||||||
|
|||||||
Reference in new issue
Block a user