bodhi/metrics.py | 6 +++--- bodhi/model.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
New commits: commit 9dfa6f594a6e643ab8a267238c025d9f43cdad8d Author: Luke Macken lmacken@redhat.com Date: Wed Jan 20 10:45:44 2010 -0500
Strip off our group name from the comment author in a few places
diff --git a/bodhi/metrics.py b/bodhi/metrics.py index 0c0c529..a7e504f 100644 --- a/bodhi/metrics.py +++ b/bodhi/metrics.py @@ -290,9 +290,9 @@ class TopTestersMetric(Metric): for comment in update.comments: if comment.author == 'bodhi' or comment.karma == 0: continue - if not self.data.has_key(comment.author): - self.data[comment.author] = 0 - self.data[comment.author] += 1 + if not self.data.has_key(comment.author.split()[0]): + self.data[comment.author.split()[0]] = 0 + self.data[comment.author.split()[0]] += 1
def done(self): items = self.data.items() diff --git a/bodhi/model.py b/bodhi/model.py index e25ab34..3570630 100644 --- a/bodhi/model.py +++ b/bodhi/model.py @@ -731,7 +731,7 @@ class PackageUpdate(SQLObject): for comment in self.comments: if comment.anonymous or comment.author == 'bodhi': continue - people.add(comment.author) + people.add(comment.author.split()[0]) mail.send(people, 'comment', self)
def unpush(self):