2bb383b178
* fix: not authorized to update entries after freezing accounts * fix: Add test case * fix(patch): patched to requeue failed reposts(check_freezing_date) * chore: misc fixes Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com> Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
14 lines
368 B
Python
14 lines
368 B
Python
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")
|