refactor: fix incorrect conditon

This commit is contained in:
khushi8112
2025-11-03 11:10:31 +05:30
parent 9b60864e46
commit c970614956

View File

@@ -112,9 +112,11 @@ def get_companies_with_frozen_limits():
if not d.accounts_frozen_till_date:
continue
if d.role_allowed_for_frozen_entries in frappe.get_roles() or frappe.session.user == "Administrator":
continue
companies_with_frozen_limits[d.name] = getdate(d.accounts_frozen_till_date)
if (
d.role_allowed_for_frozen_entries not in frappe.get_roles()
and frappe.session.user != "Administrator"
):
companies_with_frozen_limits[d.name] = getdate(d.accounts_frozen_till_date)
return companies_with_frozen_limits