mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05:00
Fix Kitsu synopsis
nullability (#1233)
This time, the Kitsu API docs are silent on whether this field (or any other field) can be null/undefined/etc, but it can happen and caused an error during search and update. This change just ensures the attribute is nullable and is set to an empty String when it is null.
This commit is contained in:
parent
339dc33f58
commit
f5c6d2e1a6
1 changed files with 2 additions and 2 deletions
|
@ -25,7 +25,7 @@ data class KitsuListSearchResult(
|
||||||
title = manga.canonicalTitle
|
title = manga.canonicalTitle
|
||||||
total_chapters = manga.chapterCount ?: 0
|
total_chapters = manga.chapterCount ?: 0
|
||||||
cover_url = manga.posterImage?.original ?: ""
|
cover_url = manga.posterImage?.original ?: ""
|
||||||
summary = manga.synopsis
|
summary = manga.synopsis ?: ""
|
||||||
tracking_url = KitsuApi.mangaUrl(remote_id)
|
tracking_url = KitsuApi.mangaUrl(remote_id)
|
||||||
publishing_status = manga.status
|
publishing_status = manga.status
|
||||||
publishing_type = manga.mangaType ?: ""
|
publishing_type = manga.mangaType ?: ""
|
||||||
|
@ -73,7 +73,7 @@ data class KitsuListSearchItemIncludedAttributes(
|
||||||
val chapterCount: Long?,
|
val chapterCount: Long?,
|
||||||
val mangaType: String?,
|
val mangaType: String?,
|
||||||
val posterImage: KitsuSearchItemCover?,
|
val posterImage: KitsuSearchItemCover?,
|
||||||
val synopsis: String,
|
val synopsis: String?,
|
||||||
val startDate: String?,
|
val startDate: String?,
|
||||||
val status: String,
|
val status: String,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue