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
This commit is contained in:
parent
6cccabe03c
commit
27914a0a90
|
@ -15,11 +15,13 @@ def get_ipr_summary(disclosure):
|
|||
names.append(disclosure.other_designations)
|
||||
|
||||
if len(names) == 1:
|
||||
return names[0]
|
||||
summary = names[0]
|
||||
elif len(names) == 2:
|
||||
return " and ".join(names)
|
||||
summary = " and ".join(names)
|
||||
elif len(names) > 2:
|
||||
return ", ".join(names[:-1]) + ", and " + names[-1]
|
||||
summary = ", ".join(names[:-1]) + ", and " + names[-1]
|
||||
return summary if len(summary) <= 128 else summary[:125]+'...'
|
||||
|
||||
|
||||
def iprs_from_docs(aliases,**kwargs):
|
||||
"""Returns a list of IPRs related to doc aliases"""
|
||||
|
|
Loading…
Reference in a new issue