mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Fix primary key search
This commit is contained in:
parent
cfe397e718
commit
265c253995
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user