1👍
✅
Like the error says, you need an actual User, not an ID. You could just pass request.user
directly. You’ll probably get the same error for topic; again, you should just pass the object itself.
LastVisitedTopic.objects.create(user=request.user, topic=t, lastvisited=lv)
Source:stackexchange.com