Skip to content

Commit

Permalink
Merge pull request #2530 from Ninad1306/after_mapping_set_taxes
Browse files Browse the repository at this point in the history
fix: Ensure List is Not Empty
  • Loading branch information
vorasmit authored Aug 22, 2024
2 parents 62e8398 + 13e77a2 commit 126386f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ def set_taxes(doc):
.orderby(sales_tax_template.modified, order=Order.desc)
.limit(1)
.run(pluck=True)
)[0] or 0
)
rate = rate[0] if rate else 0

tax_types = ("igst",)
if not is_inter_state_supply(doc):
Expand Down

0 comments on commit 126386f

Please sign in to comment.