Skip to content

Commit 7bc7a66

Browse files
committed
update batch requests content to reflect using dictionaries for requests
1 parent dc1e3e4 commit 7bc7a66

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

samples/batch_requests/batch_request_with_custom_error_class.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@ def not_found() -> 'CustomError':
7474
batch_request_item3 = BatchRequestItem(request_information=request_info3)
7575

7676
# Create a BatchRequestContent
77-
batch_request_content = [batch_request_item1, batch_request_item2, batch_request_item3]
77+
batch_request_content = {
78+
batch_request_item1.id: batch_request_item1,
79+
batch_request_item2.id: batch_request_item2
80+
}
81+
7882
batch_content = BatchRequestContent(batch_request_content)
7983

8084

samples/batch_requests/batch_request_with_parsable_as_response_type.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@
4949
batch_request_item2 = BatchRequestItem(request_information=request_info2)
5050

5151
# Create a batch request content
52-
batch_request_content = [batch_request_item1, batch_request_item2]
52+
batch_request_content = {
53+
batch_request_item1.id: batch_request_item1,
54+
batch_request_item2.id: batch_request_item2
55+
}
56+
5357
batch_content = BatchRequestContent(batch_request_content)
5458

5559

0 commit comments

Comments
 (0)