summaryrefslogtreecommitdiff
path: root/django/contrib
diff options
context:
space:
mode:
authorStefan Brand <stefan.brand@eox.at>2023-02-17 09:44:17 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-02-17 19:56:29 +0100
commiteacf6b73d8eace004f840bd9b80c8c671caab9da (patch)
treea3223dbfa8284071c3e601d3638d6050087393a6 /django/contrib
parentd77762de038d1ab46cdcda2b7202d36c80956e25 (diff)
downloaddjango-eacf6b73d8eace004f840bd9b80c8c671caab9da.tar.gz
Fixed #34302 -- Fixed SpatialReference.srid for objects without top-level authority.
Diffstat (limited to 'django/contrib')
-rw-r--r--django/contrib/gis/gdal/srs.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/gis/gdal/srs.py b/django/contrib/gis/gdal/srs.py
index dc52954acf..cd0554eb12 100644
--- a/django/contrib/gis/gdal/srs.py
+++ b/django/contrib/gis/gdal/srs.py
@@ -209,7 +209,7 @@ class SpatialReference(GDALBase):
def srid(self):
"Return the SRID of top-level authority, or None if undefined."
try:
- return int(self.attr_value("AUTHORITY", 1))
+ return int(self.auth_code(target=None))
except (TypeError, ValueError):
return None