Skip to content

Commit

Permalink
Fix multipart request bug, where JSON is added even if it's null
Browse files Browse the repository at this point in the history
  • Loading branch information
omarryhan committed Jan 12, 2021
1 parent a7457a9 commit 5136567
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion aiogoogle/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
__about__ = "Async Google API client"
__description__ = __about__
__url__ = "https://github.com/omarryhan/aiogoogle"
__version_info__ = ("1", "1", "1")
__version_info__ = ("1", "1", "2")
__version__ = ".".join(__version_info__)
__author__ = "Omar Ryhan"
__author_email__ = "[email protected]"
Expand Down
3 changes: 2 additions & 1 deletion aiogoogle/sessions/aiohttp_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ async def fire_request(request):
request.media_upload.chunk_size
)
)
mpwriter.append_json(request.json)
if request.json:
mpwriter.append_json(request.json)
return await self.request(
method=request.method,
url=request.media_upload.upload_path,
Expand Down

0 comments on commit 5136567

Please sign in to comment.