Skip to content

Commit

Permalink
fix(UX): bulk delete error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush committed Apr 29, 2024
1 parent 71dfffa commit 926c888
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions frappe/desk/reportview.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,16 @@ def delete_bulk(doctype, items):
if undeleted_items and len(items) != len(undeleted_items):
frappe.clear_messages()
delete_bulk(doctype, undeleted_items)
elif undeleted_items:
frappe.msgprint(
_("Failed to delete {0} documents: {1}").format(len(undeleted_items), ", ".join(undeleted_items)),
realtime=True,
title=_("Bulk Operation Failed"),
)
else:
frappe.msgprint(
_("Deleted all documents successfully"), realtime=True, title=_("Bulk Operation Successful")
)


@frappe.whitelist()
Expand Down

0 comments on commit 926c888

Please sign in to comment.