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

Problem using serializer with Dumpdata #29

Open
JustinKellogg opened this issue Jun 5, 2014 · 2 comments
Open

Problem using serializer with Dumpdata #29

JustinKellogg opened this issue Jun 5, 2014 · 2 comments

Comments

@JustinKellogg
Copy link

When I run dumpdata with geojson it doesn't detect any features.

Looked into it a bit and dumpdata passes a generator object to the serialize methods, and this serializer seems to expect queryset-like objects.

@leplatrem
Copy link
Collaborator

It should work with lists, but indeed, not sure with generators...
https://github.com/makinacorpus/django-geojson/blob/master/djgeojson/serializers.py#L346-L347

Instead of isinstance(queryset, list), we could check something like hasattr(queryset, '__iter__'). Don't hesitate to open a pull-request !

@JustinKellogg
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants