Skip to content
Permalink
Browse files

[bugfix] Fixes relation widget reference when filter value contains a…

… quote #16399
  • Loading branch information
pblottiere committed Jul 3, 2017
1 parent f691890 commit 2d44e400e1c49ba04b3b18321b1c0b28af42d4bf
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/qgsrelation.cpp
@@ -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
{

0 comments on commit 2d44e40

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