Skip to content

Commit

Permalink
Fix 348946 by also casting the end expression
Browse files Browse the repository at this point in the history
I think this is just forgotten in an earlier commit.
When the start is 'cast' but the end is not, there are issues when
for example the actual values are Date's (instead of DateTime's).
  • Loading branch information
rduivenvoorde authored and github-actions[bot] committed Sep 4, 2022
1 parent 66a4d75 commit d7cddc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/vector/qgsvectorlayertemporalproperties.cpp
Expand Up @@ -556,7 +556,7 @@ QString QgsVectorLayerTemporalProperties::createFilterString( const QgsVectorLay
return QStringLiteral( "(%1 %2 %3 OR %1 IS NULL) AND (%4 %5 %6 OR %4 IS NULL)" ).arg( dateTimefieldCast( mStartFieldName ),
filterRange.includeEnd() ? QStringLiteral( "<=" ) : QStringLiteral( "<" ),
dateTimeExpressionLiteral( filterRange.end() ),
QgsExpression::quotedColumnRef( mEndFieldName ),
dateTimefieldCast( mEndFieldName ),
limitMode() == Qgis::VectorTemporalLimitMode::IncludeBeginIncludeEnd ? QStringLiteral( ">=" ) : QStringLiteral( ">" ),
dateTimeExpressionLiteral( filterRange.begin() ) );

Expand Down

0 comments on commit d7cddc9

Please sign in to comment.