int() argument must be a string or a number, not 'SimpleLazyObject'

The likely cause is that you're setting 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