From 7f107b23068bab8e4f38697b5386bedb3e208c8c Mon Sep 17 00:00:00 2001 From: Profitroll Date: Mon, 6 May 2024 13:29:26 +0300 Subject: [PATCH] Fixed raw_result absent on deleted object --- plugins/callbacks/submission.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/callbacks/submission.py b/plugins/callbacks/submission.py index 797d403..330693c 100644 --- a/plugins/callbacks/submission.py +++ b/plugins/callbacks/submission.py @@ -138,7 +138,7 @@ async def callback_query_no(app: PyroClient, callback: CallbackQuery): db_entry = await col_submitted.delete_one({"_id": ObjectId(fullcallback[2])}) if ( - db_entry["temp"]["uuid"] is not None + db_entry.raw_result["temp"]["uuid"] is not None and Path( f"{app.config['locations']['data']}/submissions/{db_entry['temp']['uuid']}" ).exists()