Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix primary key search
  • Loading branch information
manisandro committed Apr 14, 2015
1 parent cfe397e commit 265c253
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspostgresprovider.cpp
Expand Up @@ -2979,7 +2979,7 @@ QgsVectorLayerImport::ImportError QgsPostgresProvider::createEmptyLayer(
{
// it already exists, try again with a new name
primaryKey = QString( "%1_%2" ).arg( pk ).arg( index++ );
fldIdx = 0;
fldIdx = -1; // it is incremented in the for loop, i.e. restarts at 0
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/providers/spatialite/qgsspatialiteprovider.cpp
Expand Up @@ -157,7 +157,7 @@ QgsSpatiaLiteProvider::createEmptyLayer(
{
// it already exists, try again with a new name
primaryKey = QString( "%1_%2" ).arg( pk ).arg( index++ );
fldIdx = 0;
fldIdx = -1; // it is incremented in the for loop, i.e. restarts at 0
}
}
}
Expand Down

0 comments on commit 265c253

Please sign in to comment.