Minor fix in setup wizard
diff --git a/erpnext/setup/page/setup_wizard/setup_wizard.py b/erpnext/setup/page/setup_wizard/setup_wizard.py
index d3942e4..bf643dd 100644
--- a/erpnext/setup/page/setup_wizard/setup_wizard.py
+++ b/erpnext/setup/page/setup_wizard/setup_wizard.py
@@ -78,9 +78,10 @@
frappe.db.commit()
except:
- traceback = frappe.get_traceback()
- for hook in frappe.get_hooks("setup_wizard_exception"):
- frappe.get_attr(hook)(traceback, args)
+ if args:
+ traceback = frappe.get_traceback()
+ for hook in frappe.get_hooks("setup_wizard_exception"):
+ frappe.get_attr(hook)(traceback, args)
raise