Where you have a folder with roms inside a platform.
Sync this platform
Try to open, get a 404
Expected behavior
the page should open
Screenshots
Desktop (please complete the following information):
OS: [e.g. iOS] Mac
Browser [e.g. chrome, safari] Chome
Version [e.g. 22] latest
Additional context
Error showned in the terminal is:
Input should be a valid dictionary [type=dict_type, input_value='Fire Emblem Souls of the Forest.7z', input_type=str]
For further information visit https://errors.pydantic.dev/2.8/v/dict_type
and this file is one of the ones in the hacks folder.
Changing this fn in backend/endpoints/rom.py:
@protected_route(router.get, "/roms", ["roms.read"])
def get_roms(
request: Request,
platform_id: int | None = None,
collection_id: int | None = None,
search_term: str = "",
limit: int | None = None,
order_by: str = "name",
order_dir: str = "asc",
) -> list[SimpleRomSchema]:
"""Get roms endpoint
Args:
request (Request): Fastapi Request object
id (int, optional): Rom internal id
Returns:
list[SimpleRomSchema]: List of roms stored in the database
"""
roms = db_rom_handler.get_roms(
platform_id=platform_id,
collection_id=collection_id,
search_term=search_term.lower(),
order_by=order_by.lower(),
order_dir=order_dir.lower(),
limit=limit,
)
return [SimpleRomSchema.from_orm_with_request(rom, request) for rom in roms]
To just return roms instead will make the issue be resolved, so its a types issue but I don't have enough python knowlage to fix it :/
RomM version v3.5.0-alpha.1 - Present in the master branch and not in the release branc
Describe the bug When you have a folder with roms inside of a platform folder it the request to get them fails with Internal server error
To Reproduce Create a structure similar to this
Where you have a folder with roms inside a platform.
Expected behavior the page should open
Screenshots
Desktop (please complete the following information):
Additional context Error showned in the terminal is:
and this file is one of the ones in the hacks folder.
Changing this fn in
backend/endpoints/rom.py
:To just return roms instead will make the issue be resolved, so its a types issue but I don't have enough python knowlage to fix it :/