Skip to content

Commit

Permalink
Remove hard-coded fid attribute reference
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Jul 7, 2023
1 parent a03bfbf commit 1743bec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/deltafilewrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ bool DeltaFileWrapper::isCreatedFeature( QgsVectorLayer *vl, QgsFeature feature
QPair<int, QString> DeltaFileWrapper::getLocalPkAttribute( const QgsVectorLayer *vl )
{
const QgsFields fields = vl->fields();
const QList<int> pkAttrs = vl->primaryKeyAttributes() << fields.indexFromName( QStringLiteral( "fid" ) );
const QList<int> pkAttrs = vl->primaryKeyAttributes();
// we assume the first index to be the primary key index... kinda stupid, but memory layers don't have primary key at all, but we use it on geopackages, but... snap!
const int pkAttrIdx = pkAttrs[0];

Expand Down

0 comments on commit 1743bec

Please sign in to comment.