Closed tudorbarascu closed 8 years ago
@tudorbarascu Indeed, I reproduce the same thing here on master_2.
By the way, I noticed that the size of the "warning" icon is now far too big within the the form:
I'm going to do some more digging and get back to you.
@tudorbarascu I have made some minor fixes last week on constraints https://github.com/pblottiere/QGIS/tree/fix_constraints. Regarding the strange behaviour with relation widgets , it was just a boolean issue...
I wanted to do a PR but Nyall is obviously working on the refactoring to add new features for constraints handling: https://github.com/qgis/QGIS/pull/3673
Fixed in the 2.18 bug fixing round (constraints not working and icon size)
Just tested and it works. Thanks!
As we already have in the database model the
(year IS NULL OR year > 1800 AND year < 2100);
constraint on pipes I thought of putting this constraint on QGIS side on this form:"year" IS NULL OR 1800 <= "year" AND "year" <= now()
.I discovered that this doesn't work at all when "relation reference" widgets are present. If the "relation reference" widget is orphaned (by deleting the relation in
project properties -> relations
then the constraint works as it should. You can test this by adding the above constraint on pipe.year and by removing the relations in the project.@pblottiere Any ideas why this doesn't work in the presence of working relation widgets?