diff sat/memory/sqla.py @ 3813:1a10b8b4f169

core (memory/sqla): `session_add` must have a default value in `delete`
author Goffi <goffi@goffi.org>
date Wed, 29 Jun 2022 10:16:03 +0200
parents b5013bada4b6
children 100dd30244c6
line wrap: on
line diff
--- a/sat/memory/sqla.py	Wed Jun 29 10:14:14 2022 +0200
+++ b/sat/memory/sqla.py	Wed Jun 29 10:16:03 2022 +0200
@@ -223,7 +223,7 @@
         db_cls: DeclarativeMeta,
         db_id_col: Mapped,
         id_value: Any,
-        joined_loads=None
+        joined_loads = None
     ) -> Optional[DeclarativeMeta]:
         stmt = select(db_cls).where(db_id_col==id_value)
         if client is not None:
@@ -248,7 +248,7 @@
     async def delete(
         self,
         db_obj: Union[DeclarativeMeta, List[DeclarativeMeta]],
-        session_add: Optional[List[DeclarativeMeta]]
+        session_add: Optional[List[DeclarativeMeta]] = None
     ) -> None:
         """Delete an object from database