~sircmpwn/todo.sr.ht

5fc9d3e86dcdeee47f585f61170f84b28e40e38a — Johannes Maibaum 2 months ago 6eaf972 0.75.19
search.py: Fix `submitter:me` queries

Fixes: https://todo.sr.ht/~sircmpwn/todo.sr.ht/257
Signed-off-by: Johannes Maibaum <jmaibaum@gmail.com>
1 files changed, 1 insertions(+), 1 deletions(-)

M todosrht/search.py
M todosrht/search.py => todosrht/search.py +1 -1
@@ 29,7 29,7 @@ def status_filter(value):

def submitter_filter(value, current_user):
    if value == "me" and current_user:
        return Ticket.submitter == current_user
        return Ticket.submitter.has(Participant.user == current_user)
    else:
        return Ticket.submitter.has(
            Participant.user.has(User.username.ilike(value.lstrip("~")))