Skip to content

Commit

Permalink
improve load_river command
Browse files Browse the repository at this point in the history
  • Loading branch information
submarcos committed Apr 24, 2024
1 parent 1b90c7e commit f60b38e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion georiviere/river/management/commands/load_rivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def handle(self, *args, **options):

objs = (Stream(geom=feat.geom.geos,
source_location=Point(feat.geom.geos[0]),
name=feat.get(name_column) or default_name) for feat in layer)
name=feat.get(name_column) or default_name) for feat in layer if feat.geom.geos.geom_typeid == 1)
count = 0
while True:
batch = list(islice(objs, batch_size))
Expand Down

0 comments on commit f60b38e

Please sign in to comment.