Closed mattiaslinnap closed 10 years ago
Also, I haven't looked much into the new Schema Mode yet, but isn't the if statement at https://github.com/djangonauts/django-hstore/blob/1.3.0/django_hstore/dict.py#L120 the wrong way around? Isn't converting everything to a string the right thing to do exactly when there is no schema?
@mattiaslinnap there's a whole block of comments, if you read it you will understand why it is coded that way. I'll check @Naddiseo's patch soon.
should be fixed, let us know.
Python "long" integers are not converted to strings by HStoreDict.ensure_acceptable_value(). Usual integers are silently promoted to infinite-sized long integers by Python, and surprisingly long is not a subclass of int.
This can eventually result in a mixed string and integer PostgreSQL array being passed to the hstore() constructor, and PostgreSQL complaining about strings not being integers.
A proposed fix is to add "long" to the list of types in https://github.com/djangonauts/django-hstore/blob/1.3.0/django_hstore/dict.py#L123