Python 3 compatibility syntax error fixes (#10519)
* Use Python 3 style print function
* Use 'Exception as e' instead of 'Exception, e'
* Unpack tuple arguments explicitly in instead of relying on auto unpacking
* Use consistent indentation
* Use 0 if stock_frozen_upto_days is None
diff --git a/erpnext/templates/utils.py b/erpnext/templates/utils.py
index e46fed6..6ebe411 100644
--- a/erpnext/templates/utils.py
+++ b/erpnext/templates/utils.py
@@ -36,11 +36,11 @@
))
if customer:
- opportunity.customer = customer[0][0]
+ opportunity.customer = customer[0][0]
elif lead:
- opportunity.lead = lead
+ opportunity.lead = lead
else:
- opportunity.lead = new_lead.name
+ opportunity.lead = new_lead.name
opportunity.insert(ignore_permissions=True)