1. Rajeesh Punathil
  2. Django-monitor
  3. Issues
Issue #6 new

Exception adding moderated object when not logged in

Eric ebrelsford@gmail.com
created an issue

I get this exception:

Cannot assign "<django.utils.functional.SimpleLazyObject object at 0x1058becd0>": "MonitorEntry.status_by" must be a "User" instance.

when adding a moderated object without being logged in. I assume this is because the user passed to MonitorEntry._moderate() is AnonymousUser. I've fixed this on my end by patching MonitorMiddleware to check if the user is authenticated and return None if not.

Comments (0)

  1. Log in to comment