Skip to content
Snippets Groups Projects
Commit ffbe85d2 authored by Tanner Prestegard's avatar Tanner Prestegard Committed by Alexander Pace
Browse files

Making searches (by submitter) more flexible

parent f85b7c70
No related branches found
No related tags found
No related merge requests found
......@@ -161,7 +161,8 @@ midQ = Optional(Suppress(Keyword("mid:"))) + (mid^midRange)
midQ = midQ.setParseAction(maybeRange("mid", dbname="id"))
# Submitter
submitter = QuotedString('"').setParseAction(lambda toks: Q(submitter__username=toks[0]))
# 6 Dec. 2016: Tanner and Alex added icontains functionality for submitter to enable simpler search patterns. To be more specific, users will have to use more complex search patterns. Last name matching functionality is primarily for searching for robot users.
submitter = QuotedString('"').setParseAction(lambda toks: Q(submitter__username__icontains=toks[0]) | Q(submitter__last_name__icontains=toks[0]))
submitterQ = Optional(Suppress(Keyword("submitter:"))) + submitter
submitterQ = submitterQ.setParseAction(lambda toks: ("submitter", toks[0]))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment