Skip to content

Commit 2a9b60c

Browse files
committed
guard against many sessions.
- Legacy-Id: 19087
1 parent 44566f8 commit 2a9b60c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

ietf/meeting/models.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,11 @@ def docname_token_only_for_multiple(self):
11981198
sess_mtg = Session.objects.filter(meeting=self.meeting, group=self.group).order_by('pk')
11991199
if len(list(sess_mtg)) > 1:
12001200
index = list(sess_mtg).index(self)
1201-
return 'sess%s' % (string.ascii_lowercase[index])
1201+
if index < 26:
1202+
token = 'sess%s' % (string.ascii_lowercase[index])
1203+
else:
1204+
token = 'sess%s%s' % (string.ascii_lowercase[index//26],string.ascii_lowercase[index%26])
1205+
return token
12021206
return None
12031207

12041208
def constraints(self):

0 commit comments

Comments
 (0)