Skip to content
Permalink
Browse files

[afs] Correctly convert attribute values to field type

Avoids AFS provider returning double values for integer
and long field types
  • Loading branch information
nyalldawson committed Feb 20, 2018
1 parent d87738b commit 8b0b826df92dbbef3001ed60197d77ca11e03127
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/providers/arcgisrest/qgsafsshareddata.cpp
@@ -90,7 +90,9 @@ bool QgsAfsSharedData::getFeature( QgsFeatureId id, QgsFeature &f, bool fetchGeo
QgsAttributes attributes( mFields.size() );
foreach ( int idx, fetchAttribIdx )
{
attributes[idx] = attributesData[mFields.at( idx ).name()];
QVariant attribute = attributesData[mFields.at( idx ).name()];
mFields.at( idx ).convertCompatible( attribute );
attributes[idx] = attribute;
if ( mFields.at( idx ).name() == QStringLiteral( "OBJECTID" ) )
{
featureId = startId + objectIds.indexOf( attributesData[mFields.at( idx ).name()].toInt() );

0 comments on commit 8b0b826

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