Skip to content

Commit

Permalink
fix: parsing non paginated result
Browse files Browse the repository at this point in the history
  • Loading branch information
amatmv committed Mar 9, 2023
1 parent 4a6e9c3 commit 66a3397
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyakeneo/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 66a3397

Please sign in to comment.