Skip to content

Commit 27914a0

Browse files
committed
Limited the lenght of the ipr document summary to 128, in order to not produce overlong message subjects. Fixes a server 500 from 5 Mar 2018.
- Legacy-Id: 14737
1 parent 6cccabe commit 27914a0

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

ietf/ipr/utils.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ def get_ipr_summary(disclosure):
1515
names.append(disclosure.other_designations)
1616

1717
if len(names) == 1:
18-
return names[0]
18+
summary = names[0]
1919
elif len(names) == 2:
20-
return " and ".join(names)
20+
summary = " and ".join(names)
2121
elif len(names) > 2:
22-
return ", ".join(names[:-1]) + ", and " + names[-1]
22+
summary = ", ".join(names[:-1]) + ", and " + names[-1]
23+
return summary if len(summary) <= 128 else summary[:125]+'...'
24+
2325

2426
def iprs_from_docs(aliases,**kwargs):
2527
"""Returns a list of IPRs related to doc aliases"""

0 commit comments

Comments
 (0)