mirror of
https://github.com/rommapp/romm.git
synced 2026-06-28 06:46:00 +00:00
typo fixes
This commit is contained in:
@@ -5,6 +5,7 @@ from sqlalchemy.orm import Session
|
||||
|
||||
from .base_handler import DBBaseHandler
|
||||
|
||||
|
||||
class DBFirmwareHandler(DBBaseHandler):
|
||||
@begin_session
|
||||
def add_firmware(self, firmware: Firmware, session: Session = None):
|
||||
@@ -24,10 +25,10 @@ class DBFirmwareHandler(DBBaseHandler):
|
||||
def get_firmware_by_filename(
|
||||
self, platform_id: int, file_name: str, session: Session = None
|
||||
):
|
||||
return (
|
||||
return session.scalar(
|
||||
select(Firmware)
|
||||
.filter_by(platform_id=platform_id, file_name=file_name)
|
||||
.first()
|
||||
.limit(1)
|
||||
)
|
||||
|
||||
@begin_session
|
||||
|
||||
@@ -36,9 +36,9 @@ class DBPlatformsHandler(DBBaseHandler):
|
||||
def get_platform_by_fs_slug(
|
||||
self, fs_slug: str, session: Session = None
|
||||
) -> Platform | None:
|
||||
return session.scalars(
|
||||
return session.scalar(
|
||||
select(Platform).filter_by(fs_slug=fs_slug).limit(1)
|
||||
).first()
|
||||
)
|
||||
|
||||
@begin_session
|
||||
def delete_platform(self, id: int, session: Session = None) -> int:
|
||||
|
||||
Reference in New Issue
Block a user