Skip to content

Commit

Permalink
FIX - When filter not specified, no features were returned.
Browse files Browse the repository at this point in the history
  • Loading branch information
terry-longmacch committed Jun 1, 2021
1 parent f7382e4 commit 6bfa836
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/roam/api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,9 @@ def search_layer(layer, filter, field_list=None, with_geometry=False):
if not with_geometry:
flags = QgsFeatureRequest.NoGeometry

request = QgsFeatureRequest()\
.setFlags(flags)

if filter:
request = QgsFeatureRequest()
request.setFlags(flags)
if not filter == '':
request.setFilterExpression(filter)

if field_list:
Expand Down

0 comments on commit 6bfa836

Please sign in to comment.