mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix(rpc): fix search arg check
When by == 'maintainer', we allow an unspecified keyword, resulting in a search of orphan packages. Fix our search check so that when no arg is given, it is set to an empty str(). We already check for valid args when type is not maintainer, so there's no need to worry about other args falling through. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
af2f3694e7
commit
9fef8b0611
1 changed files with 2 additions and 2 deletions
|
@ -200,8 +200,8 @@ class RPC:
|
||||||
if by != "m" and not len(args):
|
if by != "m" and not len(args):
|
||||||
raise RPCError("No request type/data specified.")
|
raise RPCError("No request type/data specified.")
|
||||||
|
|
||||||
arg = args[0]
|
arg = args[0] if args else str()
|
||||||
if len(arg) < 2:
|
if by != "m" and len(arg) < 2:
|
||||||
raise RPCError("Query arg too small.")
|
raise RPCError("Query arg too small.")
|
||||||
|
|
||||||
search = RPCSearch()
|
search = RPCSearch()
|
||||||
|
|
Loading…
Add table
Reference in a new issue