Skip to content

Composite types are not compatible with Django serializers #17

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

Closed
georgebrock opened this issue Feb 19, 2018 · 1 comment
Closed

Composite types are not compatible with Django serializers #17

georgebrock opened this issue Feb 19, 2018 · 1 comment
Labels

Comments

@georgebrock
Copy link

Using django.core.serializers to serialize model objects that use composite types (e.g. by running python manage.py dumpdata) will result in data that cannot be deserialized (e.g. by running python manage.py loaddata).

This could probably be fixed by adding a postgres_composite_types.BaseField.value_to_string method that returned a string that was acceptable to Postgres (e.g. for a type composing two integers a string like "(1,2)" would work).

@georgebrock
Copy link
Author

@timheap Thanks for the fix!

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

No branches or pull requests

2 participants