The trace back is pointing to line 14
of wgwt/web/notification_central/views.py
, saying that it's trying to access the userprofile
attribute of an AnonymousUser
object (which doesn't exist).
One fix would be to make sure you're logged in... (so that request.user
is an auth.User
object).
Another is to only go down that path if request.user
is not anonymous, ie:
if not isinstance(request.user, AnonymousUser):
data = get_messages(request.user.userprofile)