Hi,
I've been struggling to save a null value to a Postgres 9.6 JSON field
using DRF. I'm testing with the Browsable API if that makes a difference.
class MyModel(models.Model):
data = JSONField(blank=True, null=True)
class MyModelSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = MyModel
fields = (
'url',
'data',
)
The validator says "Value must be valid JSON." when I leave the value blank.
I've tried every combination of required, allow_null, default that I can think
of and nothing works.
Any help?
Thanks,
Jeff
--
You received this message because you are subscribed to the Google Groups
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.