diff --git a/erpnext/patches/v5_0/manufacturing_activity_type.py b/erpnext/patches/v5_0/manufacturing_activity_type.py index 5988dd3f81..f0768322e2 100644 --- a/erpnext/patches/v5_0/manufacturing_activity_type.py +++ b/erpnext/patches/v5_0/manufacturing_activity_type.py @@ -4,7 +4,7 @@ import frappe def execute(): - if not frappe.db.exists('Activity Type','Manufacturing'): + if not frappe.db.exists('Activity Type','Manufacturing') and frappe.get_all("Company"): frappe.get_doc({ "doctype": "Activity Type", "activity_type": "Manufacturing"