mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-12 00:02:25 -04:00
get in every case if not valid the copy of the value
even if unique constraint because it checks if existent - otherwise it get's null there
This commit is contained in:
parent
e8c15a9c46
commit
d62eb6e4d8
@ -424,6 +424,14 @@ QgsFeature QgsVectorLayerUtils::createFeature( const QgsVectorLayer *layer, cons
|
||||
}
|
||||
}
|
||||
|
||||
// 5. passed attribute value
|
||||
// note - deliberately not using else if!
|
||||
if ( !v.isValid() && attributes.contains( idx ) )
|
||||
{
|
||||
v = attributes.value( idx );
|
||||
}
|
||||
|
||||
|
||||
// last of all... check that unique constraints are respected
|
||||
// we can't handle not null or expression constraints here, since there's no way to pick a sensible
|
||||
// value if the constraint is violated
|
||||
|
Loading…
x
Reference in New Issue
Block a user