🚑 修复商品图标显示 (#1823)

This commit is contained in:
HibiKier 2025-01-07 14:50:47 +08:00 committed by GitHub
parent 2c798a6cd8
commit e124c1dbdb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -35,8 +35,10 @@ async def html_image() -> bytes:
if goods[1].icon:
path = ICON_PATH / goods[1].icon
if path.exists():
icon = "data:image/png;base64,"
f"{BuildImage.open(ICON_PATH / goods[1].icon).pic2bs4()[9:]}"
icon = (
"data:image/png;base64,"
f"{BuildImage.open(ICON_PATH / goods[1].icon).pic2bs4()[9:]}"
)
partition_dict[goods[1].partition].append(
{
"id": goods[0],