fix: not authorized to update entries after freezing accounts (#27937)

* 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>
This commit is contained in:
Noah Jacob
2021-10-13 16:20:08 +05:30
committed by GitHub
parent 790c1cda6f
commit 2bb383b178
4 changed files with 27 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
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")