refactor: update dimensions, only if provided
diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py
index d688544..5525af4 100644
--- a/erpnext/accounts/utils.py
+++ b/erpnext/accounts/utils.py
@@ -2097,7 +2097,8 @@
dr_or_cr + "_in_account_currency": 0,
}
)
- journal_account.update(dimensions)
+ if dimensions:
+ journal_account.update(dimensions)
journal_entry.append("accounts", journal_account)
journal_account = frappe._dict(
@@ -2113,7 +2114,8 @@
reverse_dr_or_cr: abs(exc_gain_loss),
}
)
- journal_account.update(dimensions)
+ if dimensions:
+ journal_account.update(dimensions)
journal_entry.append("accounts", journal_account)
journal_entry.save()