Skip to content

Commit

Permalink
#828 add the user_id filter
Browse files Browse the repository at this point in the history
  • Loading branch information
D-GopalKrishna committed Dec 11, 2023
1 parent 67857a0 commit 651d937
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,13 @@ def get(self, id):

def search_qs(self, filter=None, q=None, tags=None, types=None, user_id=None):
q_base = self.model.query
if user_id is not None:
q_base = q_base.filter_by(user_id=user_id)

if filter is None:
if tags:
q_base = self.filter_by_tags(tags, q_base)
else:
# qfilter handles the search by name, summary, and user_id
q_base = self.filter_by_qfilters(filter, q_base)
q_base = self.filter_by_search_tags(filter, q_base)
if tags:
Expand Down

0 comments on commit 651d937

Please sign in to comment.