refactor: prevent permissions by always processing in background
diff --git a/erpnext/utilities/bulk_transaction.py b/erpnext/utilities/bulk_transaction.py
index 679d5bd..9678488 100644
--- a/erpnext/utilities/bulk_transaction.py
+++ b/erpnext/utilities/bulk_transaction.py
@@ -15,18 +15,15 @@
length_of_data = len(deserialized_data)
- if length_of_data > 10:
- frappe.msgprint(
- _("Started a background job to create {1} {0}").format(to_doctype, length_of_data)
- )
- frappe.enqueue(
- job,
- deserialized_data=deserialized_data,
- from_doctype=from_doctype,
- to_doctype=to_doctype,
- )
- else:
- job(deserialized_data, from_doctype, to_doctype)
+ frappe.msgprint(
+ _("Started a background job to create {1} {0}").format(to_doctype, length_of_data)
+ )
+ frappe.enqueue(
+ job,
+ deserialized_data=deserialized_data,
+ from_doctype=from_doctype,
+ to_doctype=to_doctype,
+ )
@frappe.whitelist()