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

500 error while accessing /api/v1/analysis/ w/ AnonymousUser #764

Closed
scottx611x opened this issue Nov 2, 2015 · 1 comment
Closed

500 error while accessing /api/v1/analysis/ w/ AnonymousUser #764

scottx611x opened this issue Nov 2, 2015 · 1 comment

Comments

@scottx611x
Copy link
Member

Reproduce:
Hit endpoint: api/v1/analysis/ as AnonymousUser

Observed:

Traceback (most recent call last):

  File "/srv/scc/virtualenvs/refinery-platform/lib/python2.7/site-packages/tastypie/resources.py", line 202, in wrapper
    response = callback(request, *args, **kwargs)

  File "/srv/scc/virtualenvs/refinery-platform/lib/python2.7/site-packages/tastypie/resources.py", line 440, in dispatch_list
    return self.dispatch('list', request, **kwargs)

  File "/srv/scc/virtualenvs/refinery-platform/lib/python2.7/site-packages/tastypie/resources.py", line 472, in dispatch
    response = method(request, **kwargs)

  File "/srv/scc/virtualenvs/refinery-platform/lib/python2.7/site-packages/tastypie/resources.py", line 1285, in get_list
    bundles.append(self.full_dehydrate(bundle))

  File "/srv/scc/virtualenvs/refinery-platform/lib/python2.7/site-packages/tastypie/resources.py", line 854, in full_dehydrate
    bundle = self.dehydrate(bundle)

  File "/srv/scc/apps/refinery-platform/refinery/core/api.py", line 669, in dehydrate
    if bundle.request.user.userprofile.uuid == bundle.data['owner']:

  File "/srv/scc/virtualenvs/refinery-platform/lib/python2.7/site-packages/django/utils/functional.py", line 205, in inner
    return func(self._wrapped, *args)

AttributeError: 'AnonymousUser' object has no attribute 'userprofile’

Expected:
No 500 Error

@scottx611x scottx611x added this to the Next milestone Nov 2, 2015
@scottx611x scottx611x changed the title 500 error while accessing /api/v1/analysis/ w/ AnonymousUser 500 error while accessing /api/v1/analysis/ w/ AnonymousUser Nov 2, 2015
@scottx611x
Copy link
Member Author

Merged with #761

@ngehlenborg ngehlenborg modified the milestones: Next, Hadley Nov 3, 2015
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

2 participants