Skip to content

Commit

Permalink
fix: reposting failed status not updated (frappe#39970)
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitwaghchaure authored Feb 20, 2024
1 parent fa1113f commit d4264f7
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,20 @@ def repost(doc):
doc.log_error("Unable to repost item valuation")

message = frappe.message_log.pop() if frappe.message_log else ""
if isinstance(message, dict):
message = message.get("message")

if traceback:
message += "<br>" + "Traceback: <br>" + traceback
frappe.db.set_value(doc.doctype, doc.name, "error_log", message)
message += "<br><br>" + "<b>Traceback:</b> <br>" + traceback

frappe.db.set_value(
doc.doctype,
doc.name,
{
"error_log": message,
"status": "Failed",
},
)

outgoing_email_account = frappe.get_cached_value(
"Email Account", {"default_outgoing": 1, "enable_outgoing": 1}, "name"
Expand Down

0 comments on commit d4264f7

Please sign in to comment.