Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch/do not exclude null properties #160

Merged
merged 2 commits into from
Jan 9, 2024

Conversation

vincentsarago
Copy link
Member

@vincentsarago vincentsarago commented Jan 9, 2024

closes #159

In the previous version (main) we were excluding None values, mostly to exclude empty geometries but sometimes it meant we were excluding valid properties, which could lead in invalid CSV headers (because row 1 and row 2 could have different properties, if row 1 had None property)

for k, v in {
if any(
[f.get("geometry", None) is not None for f in item_list["items"]]
):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we first check if we have any data with geometry

**f.get("properties", {}),
}
for f in item_list["items"]
)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here we can safely ignore geometry because of the previous test

@vincentsarago vincentsarago requested a review from bitner January 9, 2024 15:11
@vincentsarago vincentsarago merged commit 3d6a047 into main Jan 9, 2024
7 checks passed
@vincentsarago vincentsarago deleted the patch/do-not-exclude-null-properties branch January 9, 2024 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Response MediaType CSV failing
2 participants