mirror of
https://github.com/rommapp/romm.git
synced 2026-06-28 06:46:00 +00:00
cleanup
This commit is contained in:
@@ -143,10 +143,7 @@ def with_details(func):
|
||||
),
|
||||
selectinload(Rom.rom_users).options(noload(RomUser.rom)),
|
||||
selectinload(Rom.metadatum).options(noload(RomMetadata.rom)),
|
||||
# `is_top_level` / `file_name_for_download` (multi-file downloads,
|
||||
# 3DS QR codes, metadata matching) read `RomFile.rom.full_path`, so
|
||||
# eager-load the parent's path columns to avoid a lazy load on a
|
||||
# detached instance once the session closes.
|
||||
# Multi-file downloads, 3DS QR codes, and metadata matching
|
||||
selectinload(Rom.files).options(
|
||||
joinedload(RomFile.rom).load_only(Rom.fs_path, Rom.fs_name)
|
||||
),
|
||||
@@ -600,8 +597,10 @@ class DBRomsHandler(DBBaseHandler):
|
||||
selectinload(Rom.rom_users).options(noload(RomUser.rom)),
|
||||
# Sort table by metadata (first_release_date)
|
||||
selectinload(Rom.metadatum).options(noload(RomMetadata.rom)),
|
||||
# Required for multi-file ROM actions and 3DS QR code
|
||||
selectinload(Rom.files),
|
||||
# Multi-file downloads, 3DS QR codes, and metadata matching
|
||||
selectinload(Rom.files).options(
|
||||
joinedload(RomFile.rom).load_only(Rom.fs_path, Rom.fs_name)
|
||||
),
|
||||
# Show sibling rom badges on cards
|
||||
selectinload(Rom.sibling_roms).options(
|
||||
noload(Rom.platform), noload(Rom.metadatum)
|
||||
|
||||
Reference in New Issue
Block a user