﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
23834	ArrayField default is an empty string and not None	ddaan		"Considering this class (from tests.postgres_tests.models):

class NullableIntegerArrayModel(models.Model):
    field = ArrayField(models.IntegerField(), blank=True, null=True)

When I save it directly after initialization it will result in an error

django.db.utils.DataError: array value must start with ""{"" or dimension information
LINE 1: ...ests_nullableintegerarraymodel"" (""field"") VALUES ('') RETURN...

This test will reproduce the error

    def test_default_null(self):
        instance = NullableIntegerArrayModel()
        instance.save()
        loaded = NullableIntegerArrayModel.objects.get(pk=instance.pk)
        self.assertEqual(loaded.field, None)
        self.assertEqual(instance.field, loaded.field)

"	Bug	new	contrib.postgres	1.7	Normal				Unreviewed	0	0	0	0	0	0
