From d4cc9daca1ac4ebe56828434181936f30e579c13 Mon Sep 17 00:00:00 2001 From: Ritvik Sardana Date: Mon, 14 Aug 2023 11:52:49 +0530 Subject: [PATCH] chore: code clean up --- .../doctype/pos_closing_entry/test_pos_closing_entry.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py b/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py index c551fdc5904a..93ba90ad9f99 100644 --- a/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py +++ b/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py @@ -167,7 +167,7 @@ def get_test_item_qty(pos_profile): item_group="All Item Groups", ) - test_item_qty = [item for item in test_item_pos["items"] if item["item_code"] == "_Test Item"][0][ - "actual_qty" - ] + test_item_qty = [item for item in test_item_pos["items"] if item["item_code"] == "_Test Item"][ + 0 + ].get("actual_qty") return test_item_qty