chore: pre-commit

This commit is contained in:
Dany Robert 2022-11-23 19:04:11 +05:30 committed by GitHub
parent b482e3876d
commit 88a0aa4077
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,8 +37,9 @@ class RepostItemValuation(Document):
if not acc_settings.acc_frozen_upto:
return
if getdate(self.posting_date) <= getdate(acc_settings.acc_frozen_upto):
if acc_settings.frozen_accounts_modifier and frappe.session.user in get_users_with_role(
if (
acc_settings.frozen_accounts_modifier
and frappe.session.user in get_users_with_role(acc_settings.frozen_accounts_modifier)
):
frappe.msgprint(_("Caution: This might alter frozen accounts."))
return