Fix an exception that is raised when creating a media item in Google Photos fails #328 (#329)

Fixes #328

When creating a new media item for Google Photos fails it does not return newMediaItemResults in the body. The code checks for this but then returns the key which it verified does not exist.

This change returns the entire response body in its entirety.
This commit is contained in:
Jaisen Mathai 2019-07-24 00:50:02 -07:00 committed by GitHub
parent 87e0420fba
commit 6a4c21fc57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -149,7 +149,7 @@ class GooglePhotos(PluginBase):
)
):
self.log('Creating new media item failed: {}'.format(resp['newMediaItemResults'][0]['status']))
self.log('Creating new media item failed: {}'.format(json.dumps(resp)))
return None
return resp['newMediaItemResults'][0]