From 13e77a2e74a0405d3e21480c7e5fb7f6844b523f Mon Sep 17 00:00:00 2001 From: Ninad1306 Date: Wed, 21 Aug 2024 17:36:18 +0530 Subject: [PATCH] fix: set rate when list not empty --- .../gst_india/overrides/subcontracting_transaction.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/india_compliance/gst_india/overrides/subcontracting_transaction.py b/india_compliance/gst_india/overrides/subcontracting_transaction.py index 90f29b01d..c38fdbbc8 100644 --- a/india_compliance/gst_india/overrides/subcontracting_transaction.py +++ b/india_compliance/gst_india/overrides/subcontracting_transaction.py @@ -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):