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

Exception thrown on AJAX request without the basket cookie #3950

Open
kunkku opened this issue Jul 16, 2022 · 0 comments
Open

Exception thrown on AJAX request without the basket cookie #3950

kunkku opened this issue Jul 16, 2022 · 0 comments

Comments

@kunkku
Copy link
Contributor

kunkku commented Jul 16, 2022

An exception is thrown when an AJAX request is made to /basket/ without the basket cookie. This can happen e.g. when the cookie has expired.

  File "/usr/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/usr/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python3.9/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/usr/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/lib/python3.9/site-packages/django/views/generic/base.py", line 98, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/lib/python3.9/site-packages/extra_views/formsets.py", line 335, in post
    return super(BaseModelFormSetView, self).post(request, *args, **kwargs)
  File "/usr/lib/python3.9/site-packages/extra_views/formsets.py", line 302, in post
    return self.formset_valid(formset)
  File "/usr/lib/python3.9/site-packages/oscar/apps/basket/views.py", line 191, in formset_valid
    self.request.basket = get_model('basket', 'Basket').objects.get(
  File "/usr/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/django/db/models/query.py", line 429, in get
    raise self.model.DoesNotExist(

Technical details

  • Python version: 3.9.7
  • Django version: 3.1.13
  • Oscar version: 3.1
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

1 participant