Reset spatial filter to prevent side-effects. master
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Wed, 5 Oct 2022 07:12:21 +0000 (09:12 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Wed, 5 Oct 2022 07:12:21 +0000 (09:12 +0200)
scripts/update_car_distances.py

index f007829b2e61b33252eaea8658748f9327d2e156..85fdd0669d383ef9e3845706268d2b2eb7146f45 100644 (file)
@@ -87,6 +87,8 @@ def update_sledrun(vao: Vao, db_cities: Layer, site: WikiSite, title: str):
     if len([car_distance for car_distance in car_distance_list if car_distance.get('geonames_id') is not None]) > 0:
         return
 
+    db_cities.SetSpatialFilter(None)
+    db_cities.SetAttributeFilter(None)
     for car_distance in car_distance_list:
         if car_distance.get('geonames_id') is None:
             name = car_distance['route']