In [2]: p = Point(1, 1)
In [3]: p.srid is None
Out[3]: True
In [4]: p.srid = p.srid
---------------------------------------------------------------------------
ArgumentError Traceback (most recent call
last)
<ipython-input-4-3612b78cc827> in <module>()
----> 1 p.srid = p.srid
/home/sergey/dev/django/django/contrib/gis/geos/geometry.py in
set_srid(self, srid)
367 def set_srid(self, srid):
368 "Sets the SRID for the geometry."
--> 369 capi.geos_set_srid(self.ptr, srid)
370 srid = property(get_srid, set_srid)
371
/home/sergey/dev/django/django/contrib/gis/geos/libgeos.pyc in
__call__(self, *args, **kwargs)
155 if self.func is None:
156 self.func = self.get_func(*self.args, **self.kwargs)
--> 157 return self.func(*args, **kwargs)
158
159 def get_func(self, *args, **kwargs):
/home/sergey/dev/django/django/contrib/gis/geos/prototypes/threadsafe.pyc
in __call__(self, *args)
54 # Call the threaded GEOS routine with pointer of the
context handle
55 # as the first argument.
---> 56 return self.cfunc(self.thread_context.handle.ptr,
*args)
57 else:
58 return self.cfunc(*args)
ArgumentError: argument 3: <type 'exceptions.TypeError'>: wrong type
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25580>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
added PR https://github.com/django/django/pull/5455
--
Ticket URL: <https://code.djangoproject.com/ticket/25580#comment:1>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"a272db70085887209946f28c9407409bfc0c7ee1" a272db7]:
{{{
#!CommitTicketReference repository=""
revision="a272db70085887209946f28c9407409bfc0c7ee1"
Fixed #25580 -- Allowed `None` to be set as SRID value.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25580#comment:2>