arnecoomans / camping.cmns.nl

VKNT, a Vacation Management System, is a place to store your possible holiday locations. It is the ideal place to start making plans, sharing and noting down tips.
1 stars 1 forks source link

Opening the profile page when not logged in shows error message #200

Closed arnecoomans closed 8 months ago

arnecoomans commented 8 months ago

Cannot assign "<SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7fbceca87a60>>": "Profile.user" must be a "User" instance.

Line 25: profile = Profile.objects.create(user=self.request.user) should not trigger when not logged in

arnecoomans commented 8 months ago

Resolved using LoginRequiredMixin