]> git.ipfire.org Git - dbl.git/commitdiff
lists: Fix updating sources
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 20 Feb 2026 15:45:12 +0000 (15:45 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 20 Feb 2026 15:45:12 +0000 (15:45 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/dbl/lists.py
src/dbl/sources.py

index ec6d8d99d4753040655e94c60b2f27eb8418959d..a1eba73783369f2268eab473e252a3b82c8776aa 100644 (file)
@@ -497,7 +497,7 @@ class List(sqlmodel.SQLModel, database.BackendMixin, table=True):
                """
                        Updates the list
                """
-               with await self.backend.db.transaction():
+               async with await self.backend.db.transaction():
                        updated = False
 
                        # Update all sources
index 6561782f74971f2622b039d0a100ecf428e85cd4..61a63474cb7ee303a349e42d991bfe628de4471b 100644 (file)
@@ -202,7 +202,7 @@ class Source(sqlmodel.SQLModel, database.BackendMixin, table=True):
                        log.debug("Forcing update of %s because it has no data" % self)
                        force = True
 
-               with await self.db.transaction():
+               async with await self.db.transaction():
                        with self.backend.client() as client:
                                # Compose some request headers
                                headers = self._make_headers(force=force)