Merge pull request #13 from Alkalit/master

правильная проверка на ошибки
This commit is contained in:
Alex Lushpai 2020-01-09 10:33:07 +03:00 committed by GitHub
commit d4bed324d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,7 +42,7 @@ class Response(object):
"""
:return: collection
"""
errors = {
} if not self.__response_body['errors'] else self.__response_body['errors']
errors = self.__response_body.get('errors', {})
return errors