diff --git a/lago_python_client/services/response.py b/lago_python_client/services/response.py index cfb8e6c..1b96105 100644 --- a/lago_python_client/services/response.py +++ b/lago_python_client/services/response.py @@ -127,7 +127,7 @@ def prepare_index_response( api_resource: [ prepare_object_response(response_model=response_model, data=el) for el in response_data[api_resource] ], - "meta": response_data["meta"], + "meta": response_data.get("meta", None), } diff --git a/tests/fixtures/overdue_balance_index.json b/tests/fixtures/overdue_balance_index.json index afcb7ed..8106dcd 100644 --- a/tests/fixtures/overdue_balance_index.json +++ b/tests/fixtures/overdue_balance_index.json @@ -12,6 +12,5 @@ "currency": "USD", "lago_invoice_ids": ["1a901a90-1a90-1a90-1a90-1a901a901a90"] } - ], - "meta": {} + ] }