Work around Pivotal sometimes not returning history data
This commit is contained in:
parent
112567a41e
commit
8de17d772c
1 changed files with 11 additions and 0 deletions
|
@ -97,7 +97,18 @@ def __print_burndown(token: str, iteration: Dict[str, Any], persons: Persons,
|
||||||
|
|
||||||
accepted_points = history['data'][0][1]
|
accepted_points = history['data'][0][1]
|
||||||
|
|
||||||
|
last_counts: List[int] = []
|
||||||
for date, *counts in history['data'][1:]:
|
for date, *counts in history['data'][1:]:
|
||||||
|
if len(counts) > 0:
|
||||||
|
# Update the last_counts variable if an update is available.
|
||||||
|
last_counts = counts
|
||||||
|
elif len(last_counts) > 0:
|
||||||
|
# If no counts are available, use those of the previous day.
|
||||||
|
counts = last_counts
|
||||||
|
else:
|
||||||
|
# If there are no last_counts either, just skip the day
|
||||||
|
continue
|
||||||
|
|
||||||
progress = ''
|
progress = ''
|
||||||
|
|
||||||
if not hide_accepted:
|
if not hide_accepted:
|
||||||
|
|
Loading…
Reference in a new issue