return obj
return None
- def _cache(self) -> None:
+ def cache(self) -> None:
"""Update object in class's cache.
Also calls ._disappear if cache holds older reference to object of same
table_name = attr.table_name
for row_ in db_conn.row_where(table_name, 'parent', obj.id_):
attr.history_from_row(row_)
- obj._cache()
+ obj.cache()
return obj
@classmethod
values)
if not isinstance(self.id_, str):
self.id_ = cursor.lastrowid # type: ignore[assignment]
- self._cache()
+ self.cache()
for attr_name in self.to_save_versioned:
getattr(self, attr_name).save(db_conn)
for table, column, attr_name, key_index in self.to_save_relations: