Skip to content

Commit

Permalink
GTC-2618 Allow layers > 1 in vector creation options
Browse files Browse the repository at this point in the history
  • Loading branch information
manukala6 committed Dec 29, 2023
1 parent 3908028 commit 213c828
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/pydantic/creation_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,10 @@ class VectorSourceCreationOptions(StrictBaseModel):
def validate_source_uri(cls, v, values, **kwargs):
if values.get("source_driver") == VectorDrivers.csv:
assert len(v) >= 1, "CSV sources require at least one input file"
else:
elif values.get("source_driver") in [VectorDrivers.esrijson, VectorDrivers.shp, VectorDrivers.geojson_seq, VectorDrivers.geojson]:
assert (
len(v) == 1
), "Non-CSV vector sources require one and only one input file"
), "GeoJSON and ESRI Shapefile vector sources require one and only one input file"
return v


Expand Down

0 comments on commit 213c828

Please sign in to comment.