Skip to content

Commit

Permalink
Do not convert boolean NULL to false
Browse files Browse the repository at this point in the history
  • Loading branch information
strk committed Dec 12, 2019
1 parent ae130d8 commit d20dd06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspostgresproviderconnection.cpp
Expand Up @@ -295,7 +295,7 @@ QList<QVariantList> QgsPostgresProviderConnection::executeSqlPrivate( const QStr
const QVariant::Type vType { typeMap.value( colIdx, QVariant::Type::String ) };
QVariant val { res.PQgetvalue( rowIdx, colIdx ) };
// Special case for bools: 'f' and 't'
if ( vType == QVariant::Bool )
if ( vType == QVariant::Bool && ! val.isNull() )
{
val = val.toString() == 't';
}
Expand Down

0 comments on commit d20dd06

Please sign in to comment.