Ignore approvals without descriptions

We don't really offer a facility to match on non-review category
approvals (like SUBM) so ignore those when matching events to
triggers.  Otherwise, matching logic that expects only review
categories will be fooled by submit or other similar approval
types.

Fixes-bug: 1284842
Fixes-bug: 1285210

Change-Id: I68b58f611df8fc2b9b2753d1579eae2e6898acc9
This commit is contained in:
James E. Blair 2014-02-26 09:59:43 -08:00
parent 3ce047a2de
commit f74f16000d
1 changed files with 2 additions and 0 deletions

View File

@ -1056,6 +1056,8 @@ class EventFilter(object):
for rapproval in self.require_approvals:
matches_approval = False
for approval in change.approvals:
if 'description' not in approval:
continue
found_approval = True
by = approval.get('by', {})
for k, v in rapproval.items():