Skip to content

Commit

Permalink
move import into build_geo_schema function
Browse files Browse the repository at this point in the history
  • Loading branch information
Bidaya0 committed Jul 26, 2022
1 parent f1b91f8 commit 025eee3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drf_spectacular/contrib/rest_framework_gis.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from django.contrib.gis.db import models
from rest_framework.utils.model_meta import get_field_info

from drf_spectacular.drainage import warn
Expand Down Expand Up @@ -83,6 +82,7 @@ def build_bbox_schema():


def build_geo_schema(model_field):
from django.contrib.gis.db import models
if isinstance(model_field, models.PointField):
return build_point_geo_schema()
elif isinstance(model_field, models.LineStringField):
Expand Down

0 comments on commit 025eee3

Please sign in to comment.