fix: smaller then instead of bigger then :-( dumb mistake (#20693)

* fix: smaller then instead of bigger then :-( dumb mistake

* fix: comment on get_all

* Update erpnext/projects/doctype/task/task.py

Co-Authored-By: Himanshu <himanshuwarekar@yahoo.com>

* Update erpnext/projects/doctype/task/task.py

Co-Authored-By: Himanshu <himanshuwarekar@yahoo.com>

Co-authored-by: Himanshu <himanshuwarekar@yahoo.com>
This commit is contained in:
RJPvT
2020-02-26 08:19:48 +01:00
committed by GitHub
parent 39c71e26b9
commit 0393cb5c43

View File

@@ -199,10 +199,10 @@ def set_multiple_status(names, status):
task.save()
def set_tasks_as_overdue():
tasks = frappe.get_all("Task", filters={'status':['not in',['Cancelled', 'Closed']]})
tasks = frappe.get_all("Task", filters={"status": ["not in", ["Cancelled", "Closed"]]}, fields=["name", "status", "review_date"])
for task in tasks:
if frappe.db.get_value("Task", task.name, "status") in 'Pending Review':
if getdate(frappe.db.get_value("Task", task.name, "review_date")) < getdate(today()):
if task.status == "Pending Review":
if getdate(task.review_date) > getdate(today()):
continue
frappe.get_doc("Task", task.name).update_status()