-
Notifications
You must be signed in to change notification settings - Fork 84
Issues with CopyRequestBuilder.post() and to_post_request_information() on several RequestBuilder classes #334
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
I’ve encountered two issues while working with the Drive functionality of msgraph-sdk-python.
- The first one was simple to investigate and seems to be easy to fix. The
CopyRequestBuilder.post()method calls theself.request_adapter.send_async()method expecting amsgraph-sdk-python/msgraph/generated/drives/item/items/item/copy/copy_request_builder.py
Line 53 in d50aa61
return await self.request_adapter.send_async(request_info, DriveItem, error_mapping) DriveItemas a response, while theCopy a DriveItem REST APIdoesn’t return anything. So I believe the fix should be simply to:
# replace this
return await self.request_adapter.send_async(request_info, DriveItem, error_mapping)
# with this
return await self.request_adapter.send_no_response_content_async(request_info, error_mapping)- The second one is more tricky and I didn’t manage to get to the bottom of it in a reasonable amount of time. When the
to_post_request_information()method is called on several RequestBuilder classes therequest_info.set_content_from_parsable()does not actually set the content onRequestInfo(I ran into this withCopyRequestBuilderandChildrenRequestBuilder)
msgraph-sdk-python/msgraph/generated/drives/item/items/item/copy/copy_request_builder.py
Line 73 in d50aa61
request_info.set_content_from_parsable(self.request_adapter, "application/json", body) msgraph-sdk-python/msgraph/generated/drives/item/items/item/children/children_request_builder.py
Line 130 in d50aa61
request_info.set_content_from_parsable(self.request_adapter, "application/json", body)
As far as I’ve understood after digging into it, the issue lies in theJsonSerializationWriter._serialize_value()method, more specifically with JsonSerializationWriter.on_before_object_serialization() method. But I may be wrong.
Would anyone be able to investigate/fix these issues any time soon?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working