Skip to content

Commit

Permalink
fixup! Merge pull request #1 from jcoux/migrate_postlogistics_to_new_api
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoux committed Jul 20, 2020
1 parent 5162c8f commit 54d4e27
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ def _prepare_customer(self, picking):
}
logo = company.postlogistics_logo
if logo:
logo_image = Image.open(StringIO(logo.decode('base64')))
logo_image = Image.open(StringIO(logo.decode()))
logo_format = logo_image.format
customer['logo'] = logo
customer['logo'] = logo.decode()
customer['logoFormat'] = logo_format
return customer

Expand Down Expand Up @@ -423,7 +423,7 @@ def generate_label(self, picking, packages, user_lang=None):
res['success'] = False
res['errors'] = [
_('Error when communicating with swisspost API: %s') %
response.json()
response.content.decode("utf-8")
]
return res

Expand Down

0 comments on commit 54d4e27

Please sign in to comment.