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

HStoreDict.__unicode__() returns empty string when dict is empty #71

Closed
montegoode opened this issue Sep 23, 2014 · 3 comments
Closed

Comments

@montegoode
Copy link

Don't know if this is a bug, but the when an HStoreDict does not have any elements in it, the unicode method returns '' rather than '{}'. The main manifestation of this is under django-rest-framework - the browsable api will not render an empty dict in the HTML Form for user editing even though the model field has been initialized with an empty dict (and not a null).

@nemesifier
Copy link
Member

Thank you for reporting this. I'll look into it later today as I'm going to issue a new release soon and I might include this improvement in it.

Bytheway, did you know about django-rest-framework-hstore? https://github.com/djangonauts/django-rest-framework-hstore

@nemesifier
Copy link
Member

Fixed and new release issued, try and let me know.
https://github.com/djangonauts/django-hstore/releases/tag/1.3.3

@montegoode
Copy link
Author

Fantastic! Thanks for fixing it - pulled the new version and it works like a charm. And yes, I know about DRF-hstore - I'm using that as well! :)

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

No branches or pull requests

2 participants