Fixed raw_result absent on deleted object

This commit is contained in:
Profitroll 2024-05-06 13:29:26 +03:00
parent 818afa0b74
commit 7f107b2306

View File

@ -138,7 +138,7 @@ async def callback_query_no(app: PyroClient, callback: CallbackQuery):
db_entry = await col_submitted.delete_one({"_id": ObjectId(fullcallback[2])}) db_entry = await col_submitted.delete_one({"_id": ObjectId(fullcallback[2])})
if ( if (
db_entry["temp"]["uuid"] is not None db_entry.raw_result["temp"]["uuid"] is not None
and Path( and Path(
f"{app.config['locations']['data']}/submissions/{db_entry['temp']['uuid']}" f"{app.config['locations']['data']}/submissions/{db_entry['temp']['uuid']}"
).exists() ).exists()