Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

gis: Fixed #6246 (Thanks jos3ph); removed unnecessary commented debug…

…ging code.

git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6966 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 24617b16679005d206e09cc507ed7e056ce574d1 1 parent 34560a0
Justin Bronn authored December 21, 2007
7  django/contrib/gis/db/models/query.py
@@ -38,15 +38,8 @@ def __init__(self, model=None):
38 38
         # If GEOM_SELECT is defined in the backend, then it will be used
39 39
         # for the selection format of the geometry column.
40 40
         if GEOM_SELECT:
41  
-            #if oracle and hasattr(self, '_ewkt'):
42 41
             # Transformed geometries in Oracle use EWKT so that the SRID
43 42
             # on the transformed lazy geometries is set correctly).
44  
-            #print '-=' * 20
45  
-            #print self._ewkt, GEOM_SELECT
46  
-            #self._geo_fmt = "'SRID=%d;'||%s" % (self._ewkt, GEOM_SELECT)
47  
-            #self._geo_fmt = GEOM_SELECT
48  
-            #else:
49  
-            #print '-=' * 20
50 43
             self._geo_fmt = GEOM_SELECT
51 44
         else:
52 45
             self._geo_fmt = '%s'
15  django/contrib/gis/utils/ogrinspect.py
@@ -110,14 +110,17 @@ def _ogrinspect(data_source, model_name, geom_name='geom', layer_key=0, srid=Non
110 110
     
111 111
     # Setting up the SRID parameter string.
112 112
     if srid is None:
113  
-        srid = layer.srs.srid
114  
-        if srid is None:
  113
+        if layer.srs is None:
115 114
             srid_str = 'srid=-1'
116  
-        elif srid == 4326:
117  
-            # WGS84 is the default.
118  
-            srid_str = ''
119 115
         else:
120  
-            srid_str = 'srid=%s' % srid
  116
+            srid = layer.srs.srid
  117
+            if srid is None:
  118
+                srid_str = 'srid=-1'
  119
+            elif srid == 4326:
  120
+                # WGS84 is the default.
  121
+                srid_str = ''
  122
+            else:
  123
+                srid_str = 'srid=%s' % srid
121 124
     else:
122 125
         srid_str = 'srid=%s' % srid
123 126
 

0 notes on commit 24617b1

Please sign in to comment.
Something went wrong with that request. Please try again.