- changed status to resolved
OpenREM home.html fails with an error on fresh install due to anonymous user
Cannot assign "<SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7f9edc16c390>>": "UserProfile.user" must be a "User" instance.
Exception Value:
Cannot assign "<SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7f9edc16c390>>": "UserProfile.user" must be a "User" instance.
I'll put an is_authenticated() check in views.py to check for this.
Comments (3)
-
reporter -
reporter - changed status to open
My fix didn't fix this, it just prevented a server crash. Needs some additional work.
-
reporter - changed status to resolved
Display of modalities on home page now controlled by whether homedata contains any items of the corresponding modality. This bypasses the display settings stored in userprofile for the home page, but does mean that the home page works properly when no user is logged in. The filtered and detail modality pages still use the display settings stored in the userprofile to determine whether to show a particular modality. This fixes issue
#195and references issue#20.→ <<cset 1dd24d1f34b5>>
- Log in to comment
Added code to check that the user is authenticated before accessing user profile. Fixes issue
#195.→ <<cset 203116c92d69>>