Skip to content

Commit

Permalink
Merge pull request #3 from Terralego/backport_tile_fix
Browse files Browse the repository at this point in the history
backport terracommon fix
  • Loading branch information
submarcos committed Sep 11, 2019
2 parents 104a08d + 13663a2 commit ba83df5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
8 changes: 7 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ CHANGELOG
0.3.1.dev0 (XXXX-XX-XX)
-----------------------

* Backport Choices class to terracommon.core
### Breaking Changes

* Move terra.Choices class to terracommon.core.helpers

### Fixes

* Fix empty tile properties when all properties are selected in filter


0.3.0 (2019-09-09)
Expand Down
9 changes: 3 additions & 6 deletions terra/tiles/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,9 @@ def get_tile(self, x, y, z,
filter = ', '.join([f"'{f}'" for f in properties_filter])
properties = f'''
(
properties
- (
SELECT array_agg(k)
FROM jsonb_object_keys(properties) AS t(k)
WHERE k NOT IN ({filter})
)
SELECT jsonb_object_agg(key, value) FROM
jsonb_each(properties)
WHERE key IN ({filter})
)
'''
elif properties_filter == []:
Expand Down

0 comments on commit ba83df5

Please sign in to comment.