File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed
Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -136,17 +136,7 @@ def validate_geojson_file(file: ContentFile) -> None:
136136 except json .JSONDecodeError as e :
137137 raise ValidationError ("Invalid JSON format in the file." ) from e
138138
139- try :
140- feature_collection = FeatureCollection (** geojson_data )
141- except ValidationError as e :
142- raise ValidationError (
143- "Invalid GeoJSON format. Ensure it is a valid FeatureCollection." ,
144- ) from e
145-
146- if feature_collection .type != "FeatureCollection" :
147- raise ValidationError (
148- "GeoJSON must be a FeatureCollection." ,
149- )
139+ feature_collection = FeatureCollection (** geojson_data )
150140
151141 if not feature_collection .features :
152142 raise ValidationError ("GeoJSON 'features' list cannot be empty." )
You can’t perform that action at this time.
0 commit comments