Skip to content
Permalink
Browse files

postgres provider: fix indexing of default values (fixes #12996; foll…

…oup 61f39d6)

(cherry picked from commit b1dac74)
  • Loading branch information
jef-n committed Jun 30, 2015
1 parent 823ac56 commit 86fe4d5ac32412efcaec8d51276873976491544a
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/providers/postgres/qgspostgresprovider.cpp
@@ -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() )
{

0 comments on commit 86fe4d5

Please sign in to comment.
You can’t perform that action at this time.