Skip to content
Permalink
Browse files

Fallback to feature id if pk attribute is not there

  • Loading branch information
mhugent committed Mar 4, 2018
1 parent 45f04b7 commit b0d354884ddb663bc87de6edaec4d6f83e184cd6
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/server/qgsowsserver.cpp
@@ -85,7 +85,13 @@ QString QgsOWSServer::featureGmlId( const QgsFeature* f, const QgsAttributeList&
{
pkId.append( pkSeparator() );
}
pkId.append( f->attribute( *it ).toString() );

QVariant pkAttribute = f->attribute( *it );
if ( !pkAttribute.isValid() )
{
return QString::number( f->id() );
}
pkId.append( pkAttribute.toString() );
}
return pkId;
}

0 comments on commit b0d3548

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