You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: 'User' object is not subscriptable
File "django/template/base.py", line 883, in _resolve_lookup
current = current[bit]
File "django/utils/functional.py", line 253, in inner
return func(_wrapped, *args)
IndexError: string index out of range
(24 additional frame(s) were not displayed)
...
File "jobserver/models/user.py", line 218, in initials
return "".join(w[0].upper() for w in self.name.split(" "))
File "jobserver/models/user.py", line 218, in <genexpr>
return "".join(w[0].upper() for w in self.name.split(" "))
The text was updated successfully, but these errors were encountered:
This appears to be based in the initials generation code which is used in place of GitHub avatars (slack thread ) which fails with @Mary-Anya 's mononymic user account trailing space in username (see below)
So probably it is only the social auth initial population we need to worry about.
User.fullname has a comment saying this is initially populated by social auth. Probably we could address the issue by overriding User.save or with a pre_save signal to strip whitespace from that field.
Sentry Issue: JOB-SERVER-MF
The text was updated successfully, but these errors were encountered: