From 10280d6140837ffe2fcebb70a57311780c160e25 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Fri, 12 Jul 2024 11:54:35 +0530 Subject: [PATCH] fix: keep status as In Progress for RIV for Timeout Error (#42274) --- .../doctype/repost_item_valuation/repost_item_valuation.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py index a3544265057..01c0f689201 100644 --- a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py +++ b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py @@ -284,6 +284,11 @@ def repost(doc): if isinstance(message, dict): message = message.get("message") + status = "Failed" + # If failed because of timeout, set status to In Progress + if traceback and "timeout" in traceback.lower(): + status = "In Progress" + if traceback: message += "

" + "Traceback:
" + traceback @@ -292,7 +297,7 @@ def repost(doc): doc.name, { "error_log": message, - "status": "Failed", + "status": status, }, )