Skip to content

Commit

Permalink
[expressions] Fix misleading error string when fields are set but no …
Browse files Browse the repository at this point in the history
…feature is available
  • Loading branch information
nyalldawson committed Jul 24, 2020
1 parent 2073790 commit 014498f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/expression/qgsexpressionnodeimpl.cpp
Expand Up @@ -1308,7 +1308,8 @@ QVariant QgsExpressionNodeColumnRef::evalNode( QgsExpression *parent, const QgsE
return feature.attribute( mName );
}
}
parent->setEvalErrorString( tr( "Field '%1' not found" ).arg( mName ) );
if ( index < 0 )
parent->setEvalErrorString( tr( "Field '%1' not found" ).arg( mName ) );
return QVariant();
}

Expand Down

0 comments on commit 014498f

Please sign in to comment.