Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#23731 closed Bug (fixed)

PointField does not allow setting blank=True and null=False

Reported by: George Tantiras Owned by: Tim Graham
Component: GIS Version: 1.7
Severity: Release blocker Keywords: PointField, gis
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by George Tantiras)

The following code worked nicely in Python 3.3 / Django 1.6.x:

from django.contrib.gis.db import models

class Coordinates(models.Model):

    point = models.PointField(blank=True,null=False)
    objects = models.GeoManager()

However, in Python 3.3 / Django 1.7.1:

$ ./manage.py makemigrations
$ ./manage.py migrate
...
ValueError: String or unicode input unrecognized as WKT EWKT, and HEXEWKB.

Change History (6)

comment:1 by George Tantiras, 10 years ago

Description: modified (diff)

comment:2 by Tim Graham, 10 years ago

Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted

comment:3 by Tim Graham, 10 years ago

Owner: changed from nobody to Tim Graham
Status: newassigned

comment:4 by Tim Graham, 10 years ago

Has patch: set

comment:5 by Tim Graham <timograham@…>, 10 years ago

Resolution: fixed
Status: assignedclosed

In d6d55368d45ca05c4c08c4981f9dba5c9b2bd72e:

Fixed #23731 -- Fixed migrations crash when adding blank GeometryFields on PostGIS.

Thanks raratiru for the report and Claude Paroz for review.

comment:6 by Tim Graham <timograham@…>, 10 years ago

In 17205a98ed0e4fb2a4ce9137508ee65efc448c07:

[1.7.x] Fixed #23731 -- Fixed migrations crash when adding blank GeometryFields on PostGIS.

Thanks raratiru for the report and Claude Paroz for review.

Backport of d6d55368d4 from master

Note: See TracTickets for help on using tickets.
Back to Top