Skip to content

Commit

Permalink
Fix Data from OGR if User is None
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsdukai committed Sep 13, 2024
1 parent 08c8a3e commit a4e4ca1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions design-doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,7 @@ git lfs could be sth to use, but maybe overkill because need to set up and opera
## TODOs
- Don't specify `.geodepot` dir when providing a path/url to a repository, but the initializer should automatically use the `.geodepot` subdirectory of the provided path
- Add locking mechanism to push/pull
- Only print traceback in debug mode
- ~~Sanitize serialize/write_to_file etc.~~
Expand Down
5 changes: 4 additions & 1 deletion src/geodepot/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,10 @@ def from_ogr_feature(cls, feature) -> Self:
df.description = feature["data_description"]
df.format = feature["data_format"]
df.driver = feature["data_driver"]
df.changed_by = User.from_pretty(feature["data_changed_by"])
if feature["data_changed_by"] is None:
df.changed_by = None
else:
df.changed_by = User.from_pretty(feature["data_changed_by"])
df.license = feature["data_license"]
if (gref := feature.GetGeometryRef()) is not None:
extent = gref.GetEnvelope()
Expand Down

0 comments on commit a4e4ca1

Please sign in to comment.