Skip to content

Commit 86fe4d5

Browse files
committed
postgres provider: fix indexing of default values (fixes #12996; folloup 61f39d6)
(cherry picked from commit b1dac74)
1 parent 823ac56 commit 86fe4d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/providers/postgres/qgspostgresprovider.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1785,12 +1785,12 @@ bool QgsPostgresProvider::addFeatures( QgsFeatureList &flist )
17851785
if ( value.isNull() )
17861786
{
17871787
const QgsField &fld = field( attrIdx );
1788-
v = paramValue( defaultValues[ attrIdx ], defaultValues[ attrIdx ] );
1788+
v = paramValue( defaultValues[ i ], defaultValues[ i ] );
17891789
features->setAttribute( attrIdx, convertValue( fld.type(), v ) );
17901790
}
17911791
else
17921792
{
1793-
v = paramValue( value.toString(), defaultValues[ attrIdx ] );
1793+
v = paramValue( value.toString(), defaultValues[ i ] );
17941794

17951795
if ( v != value.toString() )
17961796
{

0 commit comments

Comments
 (0)