Skip to content

Commit

Permalink
Merge pull request #73 from KhaledBousrih/feature-add-encoding-in-dat…
Browse files Browse the repository at this point in the history
…amodel-load

Add utf8 encoding while loading datamodel
  • Loading branch information
lcognat committed Feb 18, 2021
2 parents 5a085bc + e1a4d60 commit 4b3c032
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Added

- Add utf8 encoding while loading datamodel
- GeoDjango PointField to compute distances

### Changed
Expand Down
2 changes: 1 addition & 1 deletion concrete_datastore/settings/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def load_datamodel(datamodel_path='current-datamodel.meta'):
datamodel_path = os.getenv('DATAMODEL_FILE') or datamodel_path

try:
with open(datamodel_path, "r") as f:
with open(datamodel_path, "r", encoding='utf8') as f:
try:
#: Try to load datamodel with 'yaml.safe_load'.
#: This method loads both yaml and json files
Expand Down

0 comments on commit 4b3c032

Please sign in to comment.