bruth / django-preserialize

Convert your model instances and querysets into dicts and list with style.
http://bruth.github.io/django-preserialize
BSD 2-Clause "Simplified" License
41 stars 6 forks source link

get_field_value: add override for JSONField #18

Closed scottp-dpaw closed 7 years ago

scottp-dpaw commented 7 years ago

For some reason get_prep_value() on django.contrib.postgres.fields.jsonb.JSONField returns a psycopg2 object (serializing to a string), whereas the direct value is a Python object tree. The more intuitive approach is to return the JSON as an integrated part of the tree, instead of a string containing JSON.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 90.104% when pulling c7b478f6dc230907e5dd391980bec79e6a0920a6 on scottp-dpaw:master into c1cd3432cad63cc45bcadc251c2694fc8c907162 on bruth:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 90.104% when pulling c7b478f6dc230907e5dd391980bec79e6a0920a6 on scottp-dpaw:master into c1cd3432cad63cc45bcadc251c2694fc8c907162 on bruth:master.

bruth commented 7 years ago

Thanks, and sorry for taking forever to merge!