File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1370,11 +1370,14 @@ bool QgsOracleProvider::addFeatures( QgsFeatureList &flist )
13701370 QVariant value = attributevec[ fieldId[i] ];
13711371
13721372 QString v;
1373- if ( !value.isValid () )
1373+ if ( !value.isValid () || value. isNull () )
13741374 {
1375- const QgsField &fld = field ( fieldId[i] );
1376- v = paramValue ( defaultValues[i], defaultValues[i] );
1377- features->setAttribute ( fieldId[i], convertValue ( fld.type (), v ) );
1375+ if ( mPrimaryKeyAttrs .contains ( i ) && !defaultValues.at ( i ).isEmpty () )
1376+ {
1377+ const QgsField &fld = field ( fieldId[i] );
1378+ v = paramValue ( defaultValues[i], defaultValues[i] );
1379+ features->setAttribute ( fieldId[i], convertValue ( fld.type (), v ) );
1380+ }
13781381 }
13791382 else
13801383 {
You can’t perform that action at this time.
0 commit comments