Skip to content

Commit

Permalink
fix: bad strings format for command get-untraslated (#34361)
Browse files Browse the repository at this point in the history
* fix: bad string foramt

* fix: bad string format

* fix: pre-commit format

---------

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
  • Loading branch information
mmdanny89 and anandbaburajan authored Mar 17, 2023
1 parent 2ac0792 commit ca10e2b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion erpnext/accounts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,9 @@ def reconcile_against_document(args): # nosemgrep
try:
doc.validate_total_debit_and_credit()
except Exception as validation_exception:
raise frappe.ValidationError(_(f"Validation Error for {doc.name}")) from validation_exception
raise frappe.ValidationError(
_("Validation Error for {0}").format(doc.name)
) from validation_exception

doc.save(ignore_permissions=True)
# re-submit advance entry
Expand Down
4 changes: 2 additions & 2 deletions erpnext/stock/doctype/pick_list/pick_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ def validate_picked_qty(self, data):
if (row.picked_qty / row.stock_qty) * 100 > over_delivery_receipt_allowance:
frappe.throw(
_(
f"You are picking more than required quantity for the item {row.item_code}. Check if there is any other pick list created for the sales order {row.sales_order}."
)
"You are picking more than required quantity for the item {0}. Check if there is any other pick list created for the sales order {1}."
).format(row.item_code, row.sales_order)
)

@frappe.whitelist()
Expand Down

0 comments on commit ca10e2b

Please sign in to comment.