Django

Code

Ticket #7579: django_-1_srid_patch.postgis.diff

File django_-1_srid_patch.postgis.diff, 0.6 kB (added by rcoup, 5 months ago)

Initial patch for postgis backend

  • django/contrib/gis/db/backend/postgis/field.py

    old new  
    8989        SRID of the field.  Specifically, this routine will substitute in the 
    9090        ST_Transform() function call. 
    9191        """ 
    92         if value is None or value.srid == self._srid: 
     92        if value is None or self._srid == -1 or value.srid == self._srid: 
    9393            return '%s' 
    9494        else: 
    9595            # Adding Transform() to the SQL placeholder.