The likely cause is that you're setting
where request.user is not a real User object,
but a SimpleLazyObject instance.
See django: Purpose of django.utils.functional.SimpleLazyObject?
for more details, but using
user = request.user
,where request.user is not a real User object,
but a SimpleLazyObject instance.
See django: Purpose of django.utils.functional.SimpleLazyObject?
for more details, but using
request.user.id
should fix
No comments:
Post a Comment