Don't display draft approvals in change list

A draft approval (eg, saved by gertty when someone cancels a
review) would be displayed in the change list entry for a change
when it should not.  This corrects that.

Change-Id: I78364245197a6fbe2532b0d588c5002fe4975012
This commit is contained in:
James E. Blair 2015-04-12 17:03:24 -04:00
parent b81c50a8e8
commit 074cb35e29
1 changed files with 2 additions and 0 deletions

View File

@ -231,6 +231,8 @@ class Change(object):
cat_max = {}
cat_value = {}
for approval in self.approvals:
if approval.draft:
continue
cur_min = cat_min.get(approval.category, 0)
cur_max = cat_max.get(approval.category, 0)
cur_min = min(approval.value, cur_min)