Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'WSGIRequest' object has no attribute 'user' #1746

Closed
amplifi opened this issue Aug 29, 2017 · 5 comments
Closed

AttributeError: 'WSGIRequest' object has no attribute 'user' #1746

amplifi opened this issue Aug 29, 2017 · 5 comments

Comments

@amplifi
Copy link
Contributor

amplifi commented Aug 29, 2017

Steps to reproduce the error

Without logging in, attempt to load a platform URL for creation, such as:

https://platform-staging.cadasta.org/organizations/allthethings/projects/quiet-car/records/locations/new

Also applies to /delete, /edit

Edit: Same error occurs with or without active user session, if trailing slash is not appended to URL

Actual behavior

Unhandled Django exception causes a 500 error in uWSGI. See https://opbeat.com/cadasta/platform-staging/errors/209/ for trace.

Expected behavior

Redirect to sign in page.

@amplifi amplifi added the bug label Aug 29, 2017
@amplifi
Copy link
Contributor Author

amplifi commented Aug 29, 2017

This is related to APPEND_SLASH, see https://stackoverflow.com/questions/11223597/django-wsgirequest-object-has-no-attribute-user-on-some-pages for explanation and fix

@dpalomino
Copy link

As this is also preventing downloading forms from ODK, priority is critical now...

@amplifi
Copy link
Contributor Author

amplifi commented Aug 29, 2017

Possibly introduced by the accounts middleware changes in #1726

@amplifi
Copy link
Contributor Author

amplifi commented Aug 29, 2017

Steps to reproduce the error

Configure ODK with proper credentials
Retrieve xforms via Get Blank Forms
Enjoy the 500
Same behaviour with GeoODK.

Actual behavior

See above

Expected behavior

Xforms properly downloaded

@alukach
Copy link
Contributor

alukach commented Aug 30, 2017

@amplifi great research! surely introduced in #1726

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants