Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix primary key search
(cherry picked from commit 265c253)
  • Loading branch information
manisandro authored and jef-n committed Apr 26, 2015
1 parent 1a827ab commit f528d2b
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 @@ -2968,7 +2968,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 f528d2b

Please sign in to comment.