Skip to content

Commit

Permalink
Merge pull request #99 from Terralego/fix_byte_str
Browse files Browse the repository at this point in the history
Fix save generated file use only bytes
  • Loading branch information
submarcos committed Dec 10, 2020
2 parents f8ebd63 + dedf988 commit 22b8f92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ CHANGELOG
---------------------------

* Fix templates not included in setup.py sdist
* Fix save generation export file


0.5.4 (2020-12-01)
Expand Down
1 change: 1 addition & 0 deletions geostore/import_export/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def send_mail_export(user, path=None):


def save_generated_file(user_id, layer_name, format_file, string_file):
string_file = string_file.encode('utf-8') if not isinstance(string_file, bytes) else string_file
path = default_storage.save('exports/users/{}/{}_{}.{}'.format(user_id,
layer_name,
int(now().timestamp()),
Expand Down

0 comments on commit 22b8f92

Please sign in to comment.