Skip to content
Permalink
Browse files

Code review.

  • Loading branch information
espinafre authored and nyalldawson committed May 25, 2020
1 parent e16ece7 commit 53477598891164156691abd944dc4dc1255fcd76
Showing with 2 additions and 7 deletions.
  1. +2 −7 src/providers/postgres/qgspostgresprovider.cpp
@@ -2343,7 +2343,7 @@ bool QgsPostgresProvider::addFeatures( QgsFeatureList &flist, Flags flags )

QString fieldname = mAttributeFields.at( idx ).name();

if ( mGeneratedValues.contains( idx ) && !mGeneratedValues.value( idx, QString() ).isEmpty() )
if ( !mGeneratedValues.value( idx, QString() ).isEmpty() )
{
QgsDebugMsg( QStringLiteral( "Skipping field %1 (idx %2) which is GENERATED." ).arg( fieldname, idx ) );
continue;
@@ -2375,12 +2375,7 @@ bool QgsPostgresProvider::addFeatures( QgsFeatureList &flist, Flags flags )

if ( i == flist.size() )
{
// generated values override everything.
if ( !mGeneratedValues[idx].isEmpty() )
{
values += delim + defVal;
}
else if ( qgsVariantEqual( v, defVal ) )
if ( qgsVariantEqual( v, defVal ) )
{
if ( defVal.isNull() )
{

0 comments on commit 5347759

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