Skip to content

Commit

Permalink
naming parameters - django-oscar 1.1 compatible
Browse files Browse the repository at this point in the history
ERROR Internal Server Error: /en/checkout/paypal/preview/5/
Traceback (most recent call last):
  File "/virtenvs/test/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/virtenvs/test/lib/python2.7/site-packages/django/utils/decorators.py", line 145, in inner
    return func(*args, **kwargs)
  File "/virtenvs/test/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/virtenvs/test/lib/python2.7/site-packages/oscar/apps/checkout/session.py", line 68, in dispatch
    request, *args, **kwargs)
  File "/virtenvs/test/lib/python2.7/site-packages/django/views/generic/base.py", line 89, in dispatch
    return handler(request, *args, **kwargs)
  File "/virtenvs/test/lib/python2.7/site-packages/paypal/express/views.py", line 200, in get
    kwargs['basket'] = self.load_frozen_basket(kwargs['basket_id'])
  File "/virtenvs/test/lib/python2.7/site-packages/paypal/express/views.py", line 231, in load_frozen_basket
    Applicator().apply(self.request, basket)
  File "/virtenvs/test/lib/python2.7/site-packages/oscar/apps/offer/applicator.py", line 26, in apply
    offers = self.get_offers(basket, user, request)
  File "/virtenvs/test/lib/python2.7/site-packages/oscar/apps/offer/applicator.py", line 58, in get_offers
    basket_offers = self.get_basket_offers(basket, user)
  File "/virtenvs/test/lib/python2.7/site-packages/oscar/apps/offer/applicator.py", line 94, in get_basket_offers
    if not basket.id or not user:
AttributeError: 'WSGIRequest' object has no attribute 'id'
  • Loading branch information
phedoreanu committed Jun 28, 2015
1 parent d98ca35 commit 9ae6a92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paypal/express/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def load_frozen_basket(self, basket_id):
basket.strategy = Selector().strategy(self.request)

# Re-apply any offers
Applicator().apply(self.request, basket)
Applicator().apply(request=self.request, basket=basket)

return basket

Expand Down

0 comments on commit 9ae6a92

Please sign in to comment.