fix: Handle edge case in get_abbr method
This commit is contained in:
parent
86b381716b
commit
f468dd0c20
1 changed files with 1 additions and 1 deletions
|
|
@ -181,7 +181,7 @@ def today():
|
|||
def get_abbr(string, max_len=2):
|
||||
abbr=''
|
||||
for part in string.split(' '):
|
||||
if len(abbr) < max_len:
|
||||
if len(abbr) < max_len and part[0]:
|
||||
abbr += part[0]
|
||||
|
||||
return abbr or '?'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue