This commit is contained in:
Georges-Antoine Assi
2026-07-19 22:59:37 -04:00
parent d6679066ba
commit bd55da4006
2 changed files with 3 additions and 18 deletions

View File

@@ -41,9 +41,6 @@ class DBSavesHandler(DBBaseHandler):
query = select(Save).filter_by(
rom_id=rom_id, user_id=user_id, file_name=file_name
)
# `slot=None` scopes to the null-slot save, not "any slot", so a
# slot-less upload can never match (and overwrite) a save living in a
# named slot.
if slot is not None:
query = query.filter(Save.slot == slot)
else:
@@ -59,9 +56,6 @@ class DBSavesHandler(DBBaseHandler):
file_name: str,
session: Session = None, # type: ignore
) -> Save | None:
# A save's on-disk identity is (file_path, file_name), independent of
# slot. Used to find whichever row owns the bytes an upload is about to
# overwrite.
return session.scalars(
select(Save)
.filter_by(