Deltares / Ribasim

Water resources modeling
https://deltares.github.io/Ribasim/
MIT License
36 stars 5 forks source link

Qgis.AttributeFormSuppression.Default does not work on older QGIS versions? #1090

Closed Huite closed 4 months ago

Huite commented 5 months ago

Currently getting this error when trying to start the QGIS plugin:

  File "C:\Users/bootsma/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ribasim_qgis\widgets\ribasim_widget.py", line 178, in add_layer
    else Qgis.AttributeFormSuppression.Default
AttributeError: type object 'Qgis' has no attribute 'AttributeFormSuppression'

I reckon this enum wasn't introduced before?

Both on: QGIS version 3.28.12-Firenze and 3.30.1-'s-Hertogenbosch

Huite commented 5 months ago

Problem is this change: ribasim_qgis/widgets/ribasim_widget.py

in: ribasim_qgis/widgets/ribasim_widget.py

visr commented 4 months ago

We should revert 8a22fc0630f343069fd3c285ae46e9fde0c71a32 for now. We can type ignore the mypy issue for now such that #1078 will not break on this and add a reminder issue that we have to redo this when bumping the least supported QGIS version.