Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix primary key search (fixes #11997)
(cherry picked from commit 3646e35)
  • Loading branch information
jef-n committed Jun 29, 2015
1 parent ce99b8e commit 77b405f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/spatialite/qgsspatialiteprovider.cpp
Expand Up @@ -150,7 +150,7 @@ QgsSpatiaLiteProvider::createEmptyLayer(
QString pk = primaryKey = "pk";
for ( int fldIdx = 0; fldIdx < fields.count(); ++fldIdx )
{
if ( fields[fldIdx].name() == pk )
if ( fields[fldIdx].name() == primaryKey )
{
// it already exists, try again with a new name
primaryKey = QString( "%1_%2" ).arg( pk ).arg( index++ );
Expand Down

0 comments on commit 77b405f

Please sign in to comment.