Friction: Fix save and delete method.

dev_dylan
Pierre-Antoine 2026-05-22 15:58:25 +02:00
parent a235f61044
commit 311df46a2c
2 changed files with 5 additions and 4 deletions

View File

@ -228,9 +228,10 @@ class Friction(SQLSubModel):
ssi = self._status.scenario_id ssi = self._status.scenario_id
return ( return (
self._begin_strickler._owner_scenario == ssi self._begin_strickler is not None
# or self._end_strickler._owner_scenario == ssi and (self._begin_strickler._owner_scenario == ssi
or super(Friction, self).must_be_saved() # or self._end_strickler._owner_scenario == ssi
or super(Friction, self).must_be_saved())
) )
def _db_save(self, execute, data=None): def _db_save(self, execute, data=None):

View File

@ -171,7 +171,7 @@ class PamhyrModelList(SQLSubModel):
lambda x: x[1], lambda x: x[1],
filter( filter(
lambda x: x[0] in indexes, lambda x: x[0] in indexes,
enumerate(self._lst) enumerate(self.lst)
) )
) )
) )