From 66a33978cde1c0213e0c63884ba8ab7038b6105b Mon Sep 17 00:00:00 2001 From: Amat Martinez Vila Date: Thu, 9 Mar 2023 15:22:35 +0100 Subject: [PATCH] fix: parsing non paginated result --- pyakeneo/result.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyakeneo/result.py b/pyakeneo/result.py index f0fb8e6..da7dca0 100644 --- a/pyakeneo/result.py +++ b/pyakeneo/result.py @@ -123,7 +123,7 @@ def is_paginated(cls, json_data: dict | list): def parse_non_paginated(cls, json_data: list) -> Dict: link_self = "" if json_data and "_links" in json_data[0]: - link_self = json_data["_links"]["self"]["href"] + link_self = json_data[0]["_links"]["self"]["href"] return { "items": json_data, "count": len(json_data),