Skip to content

Commit

Permalink
fix: check if shipping rule value exists
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesis189 committed Nov 10, 2021
1 parent 18ae03d commit af1fce0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/controllers/taxes_and_totals.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def calculate_net_total(self):

self.doc.round_floats_in(self.doc, ["total", "base_total", "net_total", "base_net_total"])

if hasattr(self.doc, "shipping_rule"):
if hasattr(self.doc, "shipping_rule") and self.doc.shipping_rule:
shipping_rule = frappe.get_doc("Shipping Rule", self.doc.shipping_rule)
shipping_rule.apply(self.doc)

Expand Down

0 comments on commit af1fce0

Please sign in to comment.