Skip to content
Permalink
Browse files

fix primary key search (fixes #11997)

(cherry picked from commit 3646e35)
  • Loading branch information
jef-n committed Jun 9, 2015
1 parent ce99b8e commit 77b405f4696d82ff7ca158db6d646d5c7b983ee4
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/providers/spatialite/qgsspatialiteprovider.cpp
@@ -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++ );

0 comments on commit 77b405f

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