Skip to content

Commit

Permalink
fix: set rate when list not empty
Browse files Browse the repository at this point in the history
(cherry picked from commit 13e77a2)
  • Loading branch information
Ninad1306 authored and mergify[bot] committed Aug 22, 2024
1 parent a4488ca commit e336735
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,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 e336735

Please sign in to comment.