Skip to content

Commit

Permalink
postgres provider: fix indexing of default values (fixes #12996; foll…
Browse files Browse the repository at this point in the history
…oup 61f39d6)

(cherry picked from commit b1dac74)
  • Loading branch information
jef-n committed Jun 30, 2015
1 parent 823ac56 commit 86fe4d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/postgres/qgspostgresprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1785,12 +1785,12 @@ bool QgsPostgresProvider::addFeatures( QgsFeatureList &flist )
if ( value.isNull() )
{
const QgsField &fld = field( attrIdx );
v = paramValue( defaultValues[ attrIdx ], defaultValues[ attrIdx ] );
v = paramValue( defaultValues[ i ], defaultValues[ i ] );
features->setAttribute( attrIdx, convertValue( fld.type(), v ) );
}
else
{
v = paramValue( value.toString(), defaultValues[ attrIdx ] );
v = paramValue( value.toString(), defaultValues[ i ] );

if ( v != value.toString() )
{
Expand Down

0 comments on commit 86fe4d5

Please sign in to comment.