Skip to content
Permalink
Browse files

Followup 15546d8, fix matching of null representation

  • Loading branch information
nyalldawson committed Jul 6, 2017
1 parent fcf3361 commit 963e25e1ee1e1ac5aeff78d95545b6399de62063
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/gui/editorwidgets/qgsrelationreferencewidget.cpp
@@ -861,7 +861,15 @@ void QgsRelationReferenceWidget::filterChanged()
if ( cb->currentIndex() != 0 )
{
const QString fieldName = cb->property( "Field" ).toString();
filters << QgsExpression::createFieldEqualityExpression( fieldName, cb->currentText() );

if ( cb->currentText() == nullValue.toString() )
{
filters << QStringLiteral( "\"%1\" IS NULL" ).arg( fieldName );
}
else
{
filters << QgsExpression::createFieldEqualityExpression( fieldName, cb->currentText() );
}
attrs << mReferencedLayer->fields().lookupField( fieldName );
}
}

0 comments on commit 963e25e

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