Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodong-Yang committed Dec 12, 2024
1 parent 34f2130 commit 0855d87
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/ota_metadata/file_table/_orm.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,14 @@ def check_entry(self, **kv: Any) -> bool:
where_cols=tuple(kv),
)

with self._con as conn:
_cur = conn.execute(_sql_stmt, kv)
_cur.row_factory = None
_res: tuple[int] = _cur.fetchone()
return _res[0] > 0
def _inner():
with self._con as conn:
_cur = conn.execute(_sql_stmt, kv)
_cur.row_factory = None
_res: tuple[int] = _cur.fetchone()
return _res[0] > 0

return self._pool.submit(_inner).result()


class FileTableNonRegularFilesORM(ORMBase[FileTableNonRegularFiles]):
Expand Down

0 comments on commit 0855d87

Please sign in to comment.