Skip to content

Commit 04e342b

Browse files
committed
Merged in [16860] from rjsparks@nostrum.com:
Be resilient to statistics queries that provide a state but not a substate. Fixes ietf-tools#2813. - Legacy-Id: 16905 Note: SVN reference [16860] has been migrated to Git commit 654ae84
1 parent fc2abcc commit 04e342b

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)