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

Delete comment through API with runtoken, fails on internal server error (500) #591

Open
ayalash opened this issue Dec 17, 2019 · 2 comments
Assignees

Comments

@ayalash
Copy link
Contributor

ayalash commented Dec 17, 2019

AttributeError: 'AnonymousUser' object has no attribute 'id'
  File "raven/middleware.py", line 20, in common_exception_handling
    yield
  File "raven/middleware.py", line 100, in __call__
    iterable = self.application(environ, start_response)
  File "werkzeug/contrib/fixers.py", line 152, in __call__
    return self.app(environ, start_response)
  File "flask/app.py", line 2295, in wsgi_app
    response = self.handle_exception(e)
  File "flask_restful/__init__.py", line 273, in error_router
    return original_handler(e)
  File "flask/app.py", line 1741, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "flask/_compat.py", line 34, in reraise
    raise value.with_traceback(tb)
  File "flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "flask_restful/__init__.py", line 273, in error_router
    return original_handler(e)
  File "flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "flask/_compat.py", line 34, in reraise
    raise value.with_traceback(tb)
  File "flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "flask_restful/__init__.py", line 480, in wrapper
    resp = resource(*args, **kwargs)
  File "flask/views.py", line 88, in view
    return self.dispatch_request(*args, **kwargs)
  File "flask_restful/__init__.py", line 595, in dispatch_request
    resp = meth(*args, **kwargs)
  File "flask_app/blueprints/rest.py", line 364, in delete
    if comment.user_id != current_user.id:
  File "werkzeug/local.py", line 347, in __getattr__
    return getattr(self._get_current_object(), name)
@ayalash
Copy link
Contributor Author

ayalash commented Dec 17, 2019

@vmalloc Any objections that we'll allow deleting comments through API with run-token authentication?

@vmalloc
Copy link
Member

vmalloc commented Dec 17, 2019

@ayalash no objections

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

No branches or pull requests

3 participants