brotherton-erpnext/erpnext/patches/v13_0/requeue_failed_reposts.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
368 B
Python
Raw Normal View History

import frappe
from frappe.utils import cstr
def execute():
reposts = frappe.get_all("Repost Item Valuation",
{"status": "Failed", "modified": [">", "2021-10-05"] },
["name", "modified", "error_log"])
for repost in reposts:
if "check_freezing_date" in cstr(repost.error_log):
frappe.db.set_value("Repost Item Valuation", repost.name, "status", "Queued")