Ticket #25532: 0001-Fix-issue-in-JSONField.patch

File 0001-Fix-issue-in-JSONField.patch, 496 bytes (added by Tommy Beadle, 9 years ago)

This is how I fixed the issue when I ran across it.

  • django/contrib/postgres/forms/jsonb.py

    a b class JSONField(forms.CharField):  
    1515        kwargs.setdefault('widget', forms.Textarea)
    1616        super(JSONField, self).__init__(**kwargs)
    1717
     18    def bound_data(self, data, initial):
     19        return json.loads(data)
     20
    1821    def to_python(self, value):
    1922        if value in self.empty_values:
    2023            return None
Back to Top