Skip to content

Commit

Permalink
Add test with '<' symbol in QGIS expression
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Feb 2, 2022
1 parent 6540a37 commit 7837215
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/server/qgsserverparameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ QStringList QgsServerParameterDefinition::toOgcFilterList() const
filters.append( "" );
pos += 2;
}
else if ( filter[pos] == '<' )
else if ( filter[pos] == '<' && pos + 7 < filter.size() && filter.mid( pos + 1, 6 ).compare( QStringLiteral( "Filter" ) ) == 0 )
{
// Single OGC filter
filters.append( filter.mid( pos ) );
Expand Down
2 changes: 1 addition & 1 deletion tests/src/python/test_qgsserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ def test_filter(self):

# multiple qgis expressions
filter0 = "to_datetime('2017-09-29 12:00:00')"
filter1 = "\"name\"=concat('t', 'wo')"
filter1 = "Contours:\"elev\" <= 1200"
filter2 = "\"name\"='three'"

param = QgsServerParameterDefinition()
Expand Down

0 comments on commit 7837215

Please sign in to comment.