Skip to content

Commit

Permalink
fix: allow empty export response in export_poeditor_project (#386)
Browse files Browse the repository at this point in the history
  • Loading branch information
rgonalo committed Apr 24, 2024
1 parent cc81a36 commit 1cee00e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ v3.1.5

*Release date: In development*

- Fix `export_poeditor_project` method allowing empty export response

v3.1.4
------

Expand Down
2 changes: 1 addition & 1 deletion toolium/utils/poeditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def export_poeditor_project(project_info, lang, file_type):
filename = response_data['result']['url'].split('/')[-1]

r = send_poeditor_request(ENDPOINT_POEDITOR_DOWNLOAD_FILE + '/' + filename, "GET", {}, 200)
poeditor_terms = r.json()
poeditor_terms = r.json() if r.content else []
logger.info('POEditor terms in "%s" project with "%s" language: %s' % (project_info['name'], lang,
len(poeditor_terms)))
return poeditor_terms
Expand Down

0 comments on commit 1cee00e

Please sign in to comment.