Fix possible IndexError (LP: #1287368)

This commit is contained in:
Thaddäus Tintenfisch 2014-03-06 14:03:54 +01:00
parent 1facb03e34
commit 4c69863fc8
1 changed files with 4 additions and 1 deletions

View File

@ -238,7 +238,10 @@ class MugshotWindow(Window):
except: except:
first_name = name first_name = name
last_name = '' last_name = ''
initials = first_name[0] if first_name:
initials = first_name[0]
else:
initials = ''
# If the variables are defined as 'none', use blank for cleanliness. # If the variables are defined as 'none', use blank for cleanliness.
if home_phone == 'none': if home_phone == 'none':