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

@@ -775,7 +775,7 @@ def validate_party_frozen_disabled(party_type, party_name):
frozen_accounts_modifier = frappe.db.get_single_value(
"Accounts Settings", "frozen_accounts_modifier"
)
if not frozen_accounts_modifier in frappe.get_roles():
if frozen_accounts_modifier not in frappe.get_roles():
frappe.throw(_("{0} {1} is frozen").format(party_type, party_name), PartyFrozen)
elif party_type == "Employee":