diff options
author | Stefan Brand <stefan.brand@eox.at> | 2023-02-17 09:44:17 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-02-17 19:56:29 +0100 |
commit | eacf6b73d8eace004f840bd9b80c8c671caab9da (patch) | |
tree | a3223dbfa8284071c3e601d3638d6050087393a6 /django/contrib | |
parent | d77762de038d1ab46cdcda2b7202d36c80956e25 (diff) | |
download | django-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.py | 2 |
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 |