🐛 Skip exception when dailynote has no data

This commit is contained in:
xris 2024-02-12 09:56:02 +08:00 committed by GitHub
parent 6facb1dfeb
commit 3fcab79349
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -520,7 +520,10 @@ class DailyMaterial(Plugin):
honey_item = HONEY_DATA[item_type].get(item_id)
if honey_item is None:
return None
icon = await getattr(self.assets_service, item_type)(item_id).icon()
try:
icon = await getattr(self.assets_service, item_type)(item_id).icon()
except KeyError:
return None
return ItemData(
id=item_id,
name=typing.cast(str, honey_item[1]),