djangonauts / django-pgjson

PostgreSQL json field support for Django
http://djangonauts.github.io/django-pgjson/
Other
131 stars 39 forks source link

Unable to query a string key that contains only numbers #46

Open thugdoubt opened 7 years ago

thugdoubt commented 7 years ago

Given the following data:

endpoint_call_types = {u'1111': u'missed', u'barf': u'missed'}

A query using filter(endpoint_call_types__at_1111='missed') fails, despite the key being a string, because django-pgjson is attempting to perform magic. The query filter(endpoint_call_types__at_barf='missed') succeeds, natch.

List index queries should use a different operator than key operations since they are, in fact, two separate operations.