fix: ignore type checking on psycopg fetch
This commit is contained in:
parent
a0acb2950c
commit
5cef99d8d9
1 changed files with 2 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ import time
|
|||
|
||||
import psycopg2
|
||||
from psycopg2.extensions import connection
|
||||
|
||||
from ports import DeviceRepository, ReadingRepository
|
||||
from domain.exceptions import DatabaseConnectionError, DatabaseError
|
||||
|
||||
|
|
@ -40,7 +41,7 @@ class PgDeviceRepository(DeviceRepository):
|
|||
cur.execute(
|
||||
"SELECT device_id FROM device WHERE device_eui = %s", (dev_eui,)
|
||||
)
|
||||
return str(cur.fetchone()[0])
|
||||
return str(cur.fetchone()[0]) # type: ignore
|
||||
except psycopg2.DatabaseError as e:
|
||||
raise DatabaseError(f"Erreur de création du device {dev_eui}") from e
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue