Skip to content

Commit

Permalink
[bugfix] Fixes relation widget reference when filter value contains a…
Browse files Browse the repository at this point in the history
… quote #16399
  • Loading branch information
pblottiere committed Jul 3, 2017
1 parent f691890 commit 2d44e40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsrelation.cpp
Expand Up @@ -180,7 +180,7 @@ QString QgsRelation::getRelatedFeaturesFilter( const QgsFeature &feature ) const
else if ( referencingField.type() == QVariant::String )
{
// Use quotes
conditions << QStringLiteral( "\"%1\" = '%2'" ).arg( fieldPair.referencingField(), val.toString() );
conditions << QStringLiteral( "\"%1\" = %2" ).arg( fieldPair.referencingField(), QgsExpression::quotedValue( val.toString() ) );
}
else
{
Expand Down

0 comments on commit 2d44e40

Please sign in to comment.