chore: code clean up
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 c551fdc..93ba90a 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 @@
 		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