[memory] Ignore unset attributes when calling changeAttributeValues

This commit is contained in:
Nyall Dawson 2025-02-07 11:19:24 +10:00
parent 984d75c3ff
commit ac756bb8e8

View File

@ -682,6 +682,9 @@ bool QgsMemoryProvider::changeAttributeValues( const QgsChangedAttributesMap &at
continue;
QVariant attrValue = it2.value();
if ( attrValue.userType() == qMetaTypeId< QgsUnsetAttributeValue >() )
continue;
// Check attribute conversion
const bool conversionError { ! QgsVariantUtils::isNull( attrValue )
&& ! mFields.at( it2.key() ).convertCompatible( attrValue, &errorMessage ) };