if the team arg is None, set the team from the parsed data

When we query for all deliverables in a series without specifying a
team, the team value returned is None. When that's passed to
Deliverable(), we don't know who the real team is. Look it up in the
parsed data instead of reporting None.

Change-Id: Ifef19450b5393dbd3f0aedb500b7d3c06aa749d0
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2016-12-01 13:59:11 -05:00
parent 333f81f738
commit 06fdd784b7
1 changed files with 2 additions and 0 deletions

View File

@ -183,6 +183,8 @@ class Deliverable(object):
def __init__(self, team, series, name, data):
self.team = team
if self.team is None:
self.team = data['team']
self.series = series
self.name = name
self._data = data