ContriHUB / Sheher

Django project to get info regarding tourist places.
1 stars 19 forks source link

Prevent 'AnonymousUser' object Error on Report Click when User is not signed in #62

Closed kunal2812 closed 10 months ago

kunal2812 commented 10 months ago

image

Problem

When an unregistered user (not signed in) clicks on the "Report" button on the HomePage (/Places/complaints), it triggers a 'AnonymousUser' object is not iterable error.

Expected Behaviour

Unregistered users should not be able to access the Report page, the "Report" button should either be unclickable or redirect them to the signup/login page to prevent the 'AnonymousUser' error.

Note: