From c44e5ac0dfaf90bba4d3df70dd2457304e495b0a Mon Sep 17 00:00:00 2001 From: abhigyanghosh30 Date: Wed, 24 Apr 2024 04:31:12 +0530 Subject: [PATCH] A more sensible way to handle free products --- webapp/shop/cred/views.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/webapp/shop/cred/views.py b/webapp/shop/cred/views.py index 223b8ad143d..4e019536ca6 100644 --- a/webapp/shop/cred/views.py +++ b/webapp/shop/cred/views.py @@ -1023,12 +1023,12 @@ def get_cue_products(ua_contracts_api, type, **kwargs): ) filtered_products = [ { - "id": listing["productID"], - "longId": listing["id"], - "period": listing["period"], - "marketplace": listing["marketplace"], - "name": listing["name"], - "price": listing["price"], + "id": listing.get("productID", ""), + "longId": listing.get("id", ""), + "period": listing.get("period", ""), + "marketplace": listing.get("marketplace", ""), + "name": listing.get("name", ""), + "price": listing.get("price", ""), } for listing in listings if (listing["productID"].endswith("key") and type == "keys")