diff options
Diffstat (limited to 'server/repo.py')
-rw-r--r-- | server/repo.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/repo.py b/server/repo.py index 7be99ac..f129fa0 100644 --- a/server/repo.py +++ b/server/repo.py @@ -4,7 +4,9 @@ from config import render, db class Repo(object): def GET(self): - repo_count = db.query('select REPO,COUNT(DISTINCT IPKEY) AS PACKAGES,COUNT(DISTINCT UUID) AS HOSTS from INSTALLED_PACKAGES natural join REPOSITORIES group by REPO') + repo_count = db.query('SELECT REPO,COUNT(DISTINCT IPKEY) AS PACKAGES,\ + COUNT(DISTINCT UUID) AS HOSTS\ + FROM INSTALLED_PACKAGES NATURAL JOIN REPOSITORIES GROUP BY REPO') repo_data = dict() for t in repo_count: repo_data[t['REPO']] = {'HOSTS':t['HOSTS'], 'PACKAGES':t['PACKAGES']} |