webapp: report correct sizes
authorHelmut Grohne <helmut@subdivi.de>
Wed, 20 Mar 2013 18:19:50 +0000 (19:19 +0100)
committerHelmut Grohne <helmut@subdivi.de>
Wed, 20 Mar 2013 18:19:50 +0000 (19:19 +0100)
webapp.py

index e234596..9ae34c2 100755 (executable)
--- a/webapp.py
+++ b/webapp.py
@@ -240,7 +240,7 @@ class Application(object):
         details = dict(package=package,
                        version=version,
                        architecture=architecture)
-        cur.execute("SELECT count(filename), sum(size) FROM content WHERE package = ?;",
+        cur.execute("SELECT count(filename), sum(size) FROM content WHERE package = ? AND function = 'sha512';",
                     (package,))
         num_files, total_size = cur.fetchone()
         details.update(dict(num_files=num_files, total_size=total_size))