mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 00:27:41 +01:00
fixup running scans and loading
This commit is contained in:
@@ -19,13 +19,7 @@ class DBPlatformsHandler(DBBaseHandler):
|
||||
platform = session.merge(platform)
|
||||
session.flush()
|
||||
|
||||
new_platform = session.scalar(
|
||||
select(Platform).filter_by(id=platform.id).limit(1)
|
||||
)
|
||||
if not new_platform:
|
||||
raise ValueError("Could not find newly created platform")
|
||||
|
||||
return new_platform
|
||||
return session.query(Platform).filter_by(id=platform.id).one()
|
||||
|
||||
@begin_session
|
||||
def get_platform(self, id: int, *, session: Session = None) -> Platform | None:
|
||||
|
||||
Reference in New Issue
Block a user