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

[bug] Fixed GeometryField exception #168 #211

Merged
merged 1 commit into from
Dec 30, 2019
Merged

[bug] Fixed GeometryField exception #168 #211

merged 1 commit into from
Dec 30, 2019

Conversation

strang1ato
Copy link
Contributor

Fixed GeometryField exception when containing an empty Point geometry
Fixes #168

@strang1ato
Copy link
Contributor Author

so that means GeometryField should return [] instead of crashing if my understanding is correct.

@nemesisdesign Does this PR is as supposed to be?

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

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

write the failing test first, then we'll find the best fix, see also my comment below

@@ -27,8 +27,11 @@ def to_representation(self, value):
if isinstance(value, dict) or value is None:
Copy link
Member

Choose a reason for hiding this comment

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

this may be the line that has to be changed

@strang1ato
Copy link
Contributor Author

@nemesisdesign I have written the test, please checkout

Fixed GeometryField exception when containing an empty Point geometry
Fixes #168
@nemesifier nemesifier merged commit 651cb2a into openwisp:master Dec 30, 2019
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.

GeometryField containing an empty Point geometry
2 participants