1
0
mirror of https://github.com/django/django.git synced 2025-01-03 15:06:09 +00:00

Moved unnecessary inner import in GeoIP2.geos().

This commit is contained in:
Nick Pope 2021-04-05 00:30:32 +01:00 committed by Mariusz Felisiak
parent 5def7f3f74
commit 31bef51d8e

View File

@ -3,6 +3,7 @@ import socket
import geoip2.database import geoip2.database
from django.conf import settings from django.conf import settings
from django.contrib.gis.geos import Point
from django.core.exceptions import ValidationError from django.core.exceptions import ValidationError
from django.core.validators import validate_ipv46_address from django.core.validators import validate_ipv46_address
from django.utils._os import to_path from django.utils._os import to_path
@ -210,7 +211,6 @@ class GeoIP2:
"Return a GEOS Point object for the given query." "Return a GEOS Point object for the given query."
ll = self.lon_lat(query) ll = self.lon_lat(query)
if ll: if ll:
from django.contrib.gis.geos import Point
return Point(ll, srid=4326) return Point(ll, srid=4326)
else: else:
return None return None