[Django] #23731: PointField does not allow setting blank=True and null=False

57 views
Skip to first unread message

Django

unread,
Oct 29, 2014, 6:37:30 PM10/29/14
to django-...@googlegroups.com
#23731: PointField does not allow setting blank=True and null=False
----------------------------+-----------------------------
Reporter: raratiru | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: 1.7
Severity: Normal | Keywords: PointField, gis
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+-----------------------------
The following code worked nicely in Python 3.3 / Django 1.6:


{{{
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:

{{{
$ ./manage.py makemigrations
$ ./manage.py migrate
}}}


{{{
...
ValueError: String or unicode input unrecognized as WKT EWKT, and HEXEWKB.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23731>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 29, 2014, 6:38:58 PM10/29/14
to django-...@googlegroups.com
#23731: PointField does not allow setting blank=True and null=False
---------------------------------+--------------------------------------

Reporter: raratiru | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: 1.7
Severity: Normal | Resolution:

Keywords: PointField, gis | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by raratiru):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Old description:

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

> {{{
> 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:
>
> {{{
> $ ./manage.py makemigrations
> $ ./manage.py migrate
> }}}
>

> {{{
> ...
> ValueError: String or unicode input unrecognized as WKT EWKT, and
> HEXEWKB.
> }}}

New description:

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.
}}}

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23731#comment:1>

Django

unread,
Oct 29, 2014, 7:15:11 PM10/29/14
to django-...@googlegroups.com
#23731: PointField does not allow setting blank=True and null=False
---------------------------------+------------------------------------

Reporter: raratiru | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: 1.7
Severity: Release blocker | Resolution:
Keywords: PointField, gis | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by timgraham):

* severity: Normal => Release blocker
* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/23731#comment:2>

Django

unread,
Oct 31, 2014, 8:45:21 AM10/31/14
to django-...@googlegroups.com
#23731: PointField does not allow setting blank=True and null=False
---------------------------------+-------------------------------------
Reporter: raratiru | Owner: timgraham
Type: Bug | Status: assigned
Component: GIS | Version: 1.7

Severity: Release blocker | Resolution:
Keywords: PointField, gis | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+-------------------------------------
Changes (by timgraham):

* owner: nobody => timgraham
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/23731#comment:3>

Django

unread,
Oct 31, 2014, 9:06:33 AM10/31/14
to django-...@googlegroups.com
#23731: PointField does not allow setting blank=True and null=False
---------------------------------+-------------------------------------
Reporter: raratiru | Owner: timgraham
Type: Bug | Status: assigned
Component: GIS | Version: 1.7
Severity: Release blocker | Resolution:
Keywords: PointField, gis | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+-------------------------------------
Changes (by timgraham):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/3451 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/23731#comment:4>

Django

unread,
Oct 31, 2014, 6:38:46 PM10/31/14
to django-...@googlegroups.com
#23731: PointField does not allow setting blank=True and null=False
---------------------------------+-------------------------------------
Reporter: raratiru | Owner: timgraham
Type: Bug | Status: closed
Component: GIS | Version: 1.7
Severity: Release blocker | Resolution: fixed

Keywords: PointField, gis | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"d6d55368d45ca05c4c08c4981f9dba5c9b2bd72e"]:
{{{
#!CommitTicketReference repository=""
revision="d6d55368d45ca05c4c08c4981f9dba5c9b2bd72e"
Fixed #23731 -- Fixed migrations crash when adding blank GeometryFields on
PostGIS.

Thanks raratiru for the report and Claude Paroz for review.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23731#comment:5>

Django

unread,
Oct 31, 2014, 6:39:03 PM10/31/14
to django-...@googlegroups.com
#23731: PointField does not allow setting blank=True and null=False
---------------------------------+-------------------------------------
Reporter: raratiru | Owner: timgraham
Type: Bug | Status: closed
Component: GIS | Version: 1.7

Severity: Release blocker | Resolution: fixed
Keywords: PointField, gis | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"17205a98ed0e4fb2a4ce9137508ee65efc448c07"]:
{{{
#!CommitTicketReference repository=""
revision="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
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23731#comment:6>

Reply all
Reply to author
Forward
0 new messages