From d424cc0d9cf3602641b6285a593e24da2d3e177e Mon Sep 17 00:00:00 2001 From: Bruno Wagner Goncalves Date: Wed, 6 Aug 2014 01:14:29 -0300 Subject: If there is no query argument, return an empty query --- service/app/pixelated_user_agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'service') diff --git a/service/app/pixelated_user_agent.py b/service/app/pixelated_user_agent.py index e2544481..ff20413f 100644 --- a/service/app/pixelated_user_agent.py +++ b/service/app/pixelated_user_agent.py @@ -44,7 +44,7 @@ def update_draft(): @app.route('/mails') def mails(): - query = SearchQuery.compile(request.args.get("q")) + query = SearchQuery.compile(request.args.get("q")) if request.args.get("q") else {'tags': {}} mails = mail_service.drafts() if "drafts" in query['tags'] else mail_service.mails(query) mails = [converter.from_mail(mail) for mail in mails] -- cgit v1.2.3