qwat / QWAT

TEKSI Water module (project QWAT) - QGIS project
https://www.teksi.ch
GNU General Public License v2.0
58 stars 31 forks source link

Pipe status changing throws error #64

Closed tudorbarascu closed 7 years ago

tudorbarascu commented 9 years ago

Trying to change a pipe status from functional to désaffecté ends up in an error:

Could not commit changes to layer conduites

Errors: ERROR: 1 attribute value change(s) not applied.

  Provider errors:
      PostGIS error while changing attributes: ERROR:  null value in column "fk_material" violates not-null constraint
    DETAIL:  Failing row contains (1, null, 4105, 4203, null, 1, 1102, 102, null, 1303, 1502, null, null, null, null, f, 16, , null, f, null, 1, null, 1, null, 2, 3, null, null, {}, 45.20, null, null, null, f, f,
tudorbarascu commented 9 years ago

I tested update qwat_od.pipe set fk_status = 101 where id = 1 and it works. Interesting, just noticed that changing the status combo-box results in reseting the value from the material combo-box! Don't have a clue why.

tudorbarascu commented 9 years ago

There seem to be a bug in the relation reference widget. A workaround would be to change the ui widget into a combo-box and configure in QGIS as value relation instead of relation reference

3nids commented 9 years ago

yes, I notice we have some troubles there. Will try to fix this.

haubourg commented 7 years ago

works in 2.18. Closing the issue