mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-12 00:02:25 -04:00
fix primary key search (fixes #11997)
This commit is contained in:
parent
1959f751f6
commit
3646e35827
@ -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++ );
|
||||
|
Loading…
x
Reference in New Issue
Block a user