Skip to content
Permalink
Browse files

[BUGFIX][Server] GetFeature: selecting attribute by clean propertyname

  • Loading branch information
rldhont committed Mar 16, 2018
1 parent 8b37bab commit 153835e73c680b917dbfdf569f9eda3147a00a14
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/server/qgswfsserver.cpp
@@ -940,11 +940,17 @@ int QgsWFSServer::getFeature( QgsRequestHandler& request, const QString& format
QStringList::const_iterator alstIt;
QList<int> idxList;
QgsFields fields = layer->pendingFields();
// build corresponding propertyname
QList<QString> propertynames;
for ( int idx = 0; idx < fields.count(); ++idx )
{
propertynames.append( fields[idx].name().replace( " ", "_" ) );
}
QString fieldName;
for ( alstIt = attrList.begin(); alstIt != attrList.end(); ++alstIt )
{
fieldName = *alstIt;
int fieldNameIdx = fields.fieldNameIndex( fieldName );
int fieldNameIdx = propertynames.indexOf( fieldName );
if ( fieldNameIdx > -1 )
{
idxList.append( fieldNameIdx );

0 comments on commit 153835e

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