mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Fix NoneType exception by only adding initials if they are set.
Closes #171
This commit is contained in:
@@ -38,7 +38,10 @@ class Profile(AbstractUser):
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
return self.get_full_name() + ' "' + self.initials + '"'
|
||||
name = self.get_full_name()
|
||||
if self.initials:
|
||||
name += ' "{}"'.format(self.initials)
|
||||
return name
|
||||
|
||||
@property
|
||||
def latest_events(self):
|
||||
|
||||
Reference in New Issue
Block a user