mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-27 13:55:19 +00:00
refactor: simplify conditional logic
Command: `sourcery review --fix --enable de-morgan .`
This commit is contained in:
@@ -661,7 +661,7 @@ def set_project_status(project, status):
|
||||
"""
|
||||
set status for project and all related tasks
|
||||
"""
|
||||
if not status in ("Completed", "Cancelled"):
|
||||
if status not in ("Completed", "Cancelled"):
|
||||
frappe.throw(_("Status must be Cancelled or Completed"))
|
||||
|
||||
project = frappe.get_doc("Project", project)
|
||||
|
||||
Reference in New Issue
Block a user