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

This commit is contained in:
RJPvT 2020-02-26 07:29:10 +01:00 committed by GitHub
parent 3957ac1408
commit 10aab65338
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -212,10 +212,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", "Completed"]]}, 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()