Issue #195 resolved

OpenREM home.html fails with an error on fresh install due to anonymous user

David Platten
created an issue

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)

  1. David Platten reporter

    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 #195 and references issue #20.

    → <<cset 1dd24d1f34b5>>

  2. Log in to comment