Skip to content

Commit d9a006a

Browse files
authored
Meta is optional in the response (#284)
* meta is optional in the response * update fixture to not include meta
1 parent 4478299 commit d9a006a

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

lago_python_client/services/response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def prepare_index_response(
127127
api_resource: [
128128
prepare_object_response(response_model=response_model, data=el) for el in response_data[api_resource]
129129
],
130-
"meta": response_data["meta"],
130+
"meta": response_data.get("meta", None),
131131
}
132132

133133

tests/fixtures/overdue_balance_index.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@
1212
"currency": "USD",
1313
"lago_invoice_ids": ["1a901a90-1a90-1a90-1a90-1a901a901a90"]
1414
}
15-
],
16-
"meta": {}
15+
]
1716
}

0 commit comments

Comments
 (0)