fix types

This commit is contained in:
Georges-Antoine Assi
2026-06-18 09:32:38 -04:00
parent ee7a581067
commit e7d46ee8c4
7 changed files with 7 additions and 2 deletions

View File

@@ -52,7 +52,7 @@ MULTIPLE_SPACE_PATTERN = re.compile(r"\s+")
class BaseRom(TypedDict):
name: NotRequired[str]
sort_name: NotRequired[str]
sort_name: NotRequired[str | None]
summary: NotRequired[str]
url_cover: NotRequired[str]
url_screenshots: NotRequired[list[str]]

View File

@@ -33,3 +33,4 @@ export type Body_update_rom_api_roms__id__put = {
url_cover?: (string | null);
url_manual?: (string | null);
};

View File

@@ -101,3 +101,4 @@ export type DetailedRomSchema = {
user_collections: Array<UserCollectionSchema>;
all_user_notes: Array<UserNoteSchema>;
};

View File

@@ -18,6 +18,7 @@ export type RomGamelistMetadata = {
video_url?: (string | null);
rating?: (number | null);
first_release_date?: (string | null);
sort_name?: (string | null);
companies?: (Array<string> | null);
franchises?: (Array<string> | null);
genres?: (Array<string> | null);

View File

@@ -91,3 +91,4 @@ export type SimpleRomSchema = {
files: Array<RomFileSchema>;
sibling_roms: Array<SiblingRomSchema>;
};

View File

@@ -481,7 +481,7 @@ async function updateRom({
const fields: FormInputField<UpdateRomInput>[] = [
["name", rom.name],
["sort_name", rom.sort_name],
["sort_name", rom.sort_name ?? ""],
["fs_name", rom.fs_name],
["summary", rom.summary],
["igdb_id", toFormIdValue(rom.igdb_id)],

View File

@@ -109,6 +109,7 @@ const syntheticRom = computed<SimpleRom>(() => ({
fs_path: "",
fs_size_bytes: 0,
name: props.game.name,
sort_name: props.game.name,
slug: props.game.slug,
summary: null,
alternative_names: [],