Skip to content

Commit 654ae84

Browse files
committed
Be resilient to statistics queries that provide a state but not a substate. Fixes ietf-tools#2813. Commit ready for merge.
- Legacy-Id: 16860
1 parent b158807 commit 654ae84

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

ietf/doc/views_stats.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright The IETF Trust 2016, All Rights Reserved
1+
# Copyright The IETF Trust 2016-2019, All Rights Reserved
22

33
import copy
44
import datetime
@@ -101,7 +101,10 @@ def make_title(queryargs):
101101
elif by == "state":
102102
state = queryargs.get('state')
103103
if state:
104-
title += ' in state %s::%s' % (state, queryargs['substate'])
104+
title += ' in state %s' % state
105+
substate = queryargs.get('substate')
106+
if substate:
107+
title += '::%s' % substate
105108
elif by == "stream":
106109
stream = queryargs.get('stream')
107110
if stream:

0 commit comments

Comments
 (0)