From 8846f0d06715c1483e87f4ab7fa457481d131b5c Mon Sep 17 00:00:00 2001 From: "lukasz.debek" Date: Wed, 27 Mar 2024 14:08:09 +0100 Subject: [PATCH] Minor code change. --- .../processing/alghorithms_inflow.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/threedi_schematisation_editor/processing/alghorithms_inflow.py b/threedi_schematisation_editor/processing/alghorithms_inflow.py index d2441a8..634f7c3 100644 --- a/threedi_schematisation_editor/processing/alghorithms_inflow.py +++ b/threedi_schematisation_editor/processing/alghorithms_inflow.py @@ -1,5 +1,4 @@ # Copyright (C) 2023 by Lutra Consulting -from collections import defaultdict from operator import itemgetter from qgis.core import ( @@ -162,7 +161,7 @@ def processAlgorithm(self, parameters, context, feedback): search_distance = self.parameterAsDouble(parameters, self.SEARCH_DISTANCE, context) if search_distance is None: raise QgsProcessingException(self.invalidSourceError(parameters, self.SEARCH_DISTANCE)) - surface_to_pipes_distances = defaultdict(list) + surface_to_pipes_distances = {} pipe_filter_request = QgsFeatureRequest( [feat.id() for feat in pipe_lyr.getFeatures() if feat["sewerage_type"] in sewerage_types] ) @@ -175,9 +174,9 @@ def processAlgorithm(self, parameters, context, feedback): if feedback.isCanceled(): return {} surface_fid = surface_feat.id() + surface_to_pipes_distances[surface_fid] = [] surface_geom = surface_feat.geometry() if surface_geom.isNull(): - surface_to_pipes_distances[surface_fid] = [] feedback.setProgress(100 * step / number_of_steps) step += 1 continue