refactor: simplify conditional logic

Command: `sourcery review --fix --enable de-morgan .`
This commit is contained in:
barredterra
2023-12-05 11:22:55 +01:00
parent 5da3e532c9
commit eb9ee3f79b
51 changed files with 104 additions and 85 deletions

View File

@@ -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)