2021-10-13 10:50:08 +00:00
|
|
|
import frappe
|
|
|
|
from frappe.utils import cstr
|
|
|
|
|
|
|
|
|
|
|
|
def execute():
|
|
|
|
|
2022-03-28 13:22:46 +00:00
|
|
|
reposts = frappe.get_all(
|
|
|
|
"Repost Item Valuation",
|
|
|
|
{"status": "Failed", "modified": [">", "2021-10-05"]},
|
|
|
|
["name", "modified", "error_log"],
|
|
|
|
)
|
2021-10-13 10:50:08 +00:00
|
|
|
|
|
|
|
for repost in reposts:
|
|
|
|
if "check_freezing_date" in cstr(repost.error_log):
|
|
|
|
frappe.db.set_value("Repost Item Valuation", repost.name, "status", "Queued")
|