summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorBruno Wagner Goncalves <bwagner@thoughtworks.com>2014-08-06 01:14:29 -0300
committerBruno Wagner Goncalves <bwagner@thoughtworks.com>2014-08-06 01:14:29 -0300
commitd424cc0d9cf3602641b6285a593e24da2d3e177e (patch)
tree75563256bd23b8fa2e2cf9ee3c8d9a50944110d2 /service
parentdec451c063876a3a580375455a3db0dcf398dc9c (diff)
If there is no query argument, return an empty query
Diffstat (limited to 'service')
-rw-r--r--service/app/pixelated_user_agent.py2
1 files changed, 1 insertions, 1 deletions
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]