Skip to content
Snippets Groups Projects
Commit d6f783a5 authored by Kevin S. Hahn's avatar Kevin S. Hahn
Browse files

api/sites always returns a list

parent c797b3a5
No related branches found
No related tags found
No related merge requests found
......@@ -186,7 +186,7 @@ class Core(base.RequestHandler):
def sites(self):
"""Return local and remote sites."""
if self.app.config['site_id'] == 'local':
return self.app.db.sites.find_one({'_id': 'local'}, {'_id': 1, 'name': 1, 'onload': 1})
return [self.app.db.sites.find_one({'_id': 'local'}, {'_id': 1, 'name': 1, 'onload': 1})]
if self.public_request or self.request.get('all').lower() in ('1', 'true'):
sites = list(self.app.db.sites.find(None, ['name']))
else:
......
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