Skip to content

Commit 7028827

Browse files
committed
postgres provider: fix default value assignment
1 parent 6c9663c commit 7028827

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/providers/postgres/qgspostgresprovider.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1949,7 +1949,7 @@ bool QgsPostgresProvider::addFeatures( QgsFeatureList &flist )
19491949
}
19501950

19511951
for ( int i = 0; i < fieldId.size(); i++ )
1952-
params << paramValue( attributevec[ fieldId[i] ].toString(), defaultValues[i] );
1952+
params << paramValue( attributevec.value( fieldId[i], defaultValues[i] ).toString(), defaultValues[i] );
19531953

19541954
QgsPostgresResult result = mConnectionRW->PQexecPrepared( "addfeatures", params );
19551955
if ( result.PQresultStatus() == PGRES_FATAL_ERROR )

0 commit comments

Comments
 (0)