Fixed deletion not working properly

This commit is contained in:
2024-05-06 12:47:09 +02:00
parent 7f107b2306
commit c9f37ea2b6
3 changed files with 11 additions and 0 deletions

View File

@@ -137,6 +137,15 @@ async def callback_query_no(app: PyroClient, callback: CallbackQuery):
db_entry = await col_submitted.delete_one({"_id": ObjectId(fullcallback[2])})
if db_entry.deleted_count == 0:
await callback.answer(
text=app._("sub_deleted", "callback", locale=user.locale).format(
fullcallback[2]
),
show_alert=True,
)
return
if (
db_entry.raw_result["temp"]["uuid"] is not None
and Path(