Deltares / imod-qgis

🗺️🧭 QGIS plugin for iMOD
GNU General Public License v2.0
7 stars 1 forks source link

In ipf_dialog, ipf_type can be referenced before assignment #48

Open JoerivanEngelen opened 1 year ago

JoerivanEngelen commented 1 year ago

One colleague ran into a:

UnboundLocalError: local variable 'ipf_type' referenced before assignment

This line https://github.com/Deltares/imod-qgis/blob/main/imodqgis/ipf/ipf_dialog.py#L146 gives trouble if no features can be found, as ipf_type then never was assigned. So better to initiate that as before the loop starts None.