Skip to content
Permalink
Browse files

Merge pull request #1993 from manisandro/fldidx

Fix primary key search uniqueness

Duplicate suffix `_0` has not been detected previously
  • Loading branch information
m-kuhn committed Apr 20, 2015
2 parents d78bc7d + 265c253 commit 634641a9c4c756a55ae00626a3509a65f839e087
@@ -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
}
}
}
@@ -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
}
}
}

0 comments on commit 634641a

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