aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'server/host.py')
-rw-r--r--server/host.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/host.py b/server/host.py
index 6d1f6f3..fab706c 100644
--- a/server/host.py
+++ b/server/host.py
@@ -55,7 +55,10 @@ class Host(object):
cpv = p['CAT'] + '/' + p['PKG'] + '-' + p['VER']
host_data['PACKAGES'][cpv] = dict()
- return render.host(host_data)
+ if helpers.is_json_request():
+ return helpers.serialize(host_data)
+ else:
+ return render.host(host_data)
def POST(self, str_uuid):
post_data = json.JSONDecoder().decode(web.data())