1
0
mirror of https://github.com/django/django.git synced 2025-10-24 22:26:08 +00:00

Fixed #34302 -- Fixed SpatialReference.srid for objects without top-level authority.

This commit is contained in:
Stefan Brand
2023-02-17 09:44:17 +01:00
committed by Mariusz Felisiak
parent d77762de03
commit eacf6b73d8
2 changed files with 12 additions and 2 deletions

View File

@@ -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