From ac756bb8e87e0db7ba722e59403e7b0fec006cc0 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Fri, 7 Feb 2025 11:19:24 +1000 Subject: [PATCH] [memory] Ignore unset attributes when calling changeAttributeValues --- src/core/providers/memory/qgsmemoryprovider.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/providers/memory/qgsmemoryprovider.cpp b/src/core/providers/memory/qgsmemoryprovider.cpp index d9cff37c84b..f4814ffee70 100644 --- a/src/core/providers/memory/qgsmemoryprovider.cpp +++ b/src/core/providers/memory/qgsmemoryprovider.cpp @@ -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 ) };