mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-22 07:07:46 +00:00
🐛 Fix failure to add entry when description is empty
This commit is contained in:
parent
9c8def3ce9
commit
346e78481f
@ -132,13 +132,15 @@ class WeaponPlugin(Plugin, BasePlugin):
|
|||||||
allow_sending_without_reply=True,
|
allow_sending_without_reply=True,
|
||||||
)
|
)
|
||||||
if reply_photo.photo:
|
if reply_photo.photo:
|
||||||
photo_file_id = reply_photo.photo[0].file_id
|
description = weapon_data.story
|
||||||
tags = _weapons_data.get(weapon_name)
|
if description:
|
||||||
entry = WeaponEntry(
|
photo_file_id = reply_photo.photo[0].file_id
|
||||||
key=f"plugin:weapon:{weapon_name}",
|
tags = _weapons_data.get(weapon_name)
|
||||||
title=weapon_name,
|
entry = WeaponEntry(
|
||||||
description=weapon_data.story,
|
key=f"plugin:weapon:{weapon_name}",
|
||||||
tags=tags,
|
title=weapon_name,
|
||||||
photo_file_id=photo_file_id,
|
description=description,
|
||||||
)
|
tags=tags,
|
||||||
await self.search_service.add_entry(entry)
|
photo_file_id=photo_file_id,
|
||||||
|
)
|
||||||
|
await self.search_service.add_entry(entry)
|
||||||
|
Loading…
Reference in New Issue
Block a user