From 126ebcdaf0fc909e6630da92084f90c641f245bf Mon Sep 17 00:00:00 2001 From: lxnay Date: Thu, 24 Jul 2008 12:52:38 +0000 Subject: [PATCH] Entropy/DistributionUGCInterface: - fix get_ugc_downloads query git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2296 cd1c1023-2f26-0410-ae45-c471fc1f0318 --- libraries/entropy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/entropy.py b/libraries/entropy.py index 0ce7e67ff..330b44b80 100644 --- a/libraries/entropy.py +++ b/libraries/entropy.py @@ -16749,7 +16749,7 @@ class DistributionUGCInterface(RemoteDbSkelInterface): def get_ugc_downloads(self, pkgkey): self.check_connection() downloads = 0 - self.execute_query('SELECT count(entropy_downloads.`count`) as `tot_downloads` FROM entropy_downloads,entropy_base WHERE entropy_base.key = %s AND entropy_base.idkey = entropy_downloads.idkey', (pkgkey,)) + self.execute_query('SELECT sum(entropy_downloads.`count`) as `tot_downloads` FROM entropy_downloads,entropy_base WHERE entropy_base.key = %s AND entropy_base.idkey = entropy_downloads.idkey', (pkgkey,)) data = self.fetchone() if data['tot_downloads'] != None: downloads = data['tot_downloads']