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

build_submission() got multiple values for keyword argument 'basket' #82

Closed
jonmer85 opened this issue Sep 24, 2014 · 1 comment
Closed
Labels

Comments

@jonmer85
Copy link

Hello,
I am seeing the error "build_submission() got multiple values for keyword argument 'basket'" in checkout/session.py when processing the success view from PayPal Express. It seems that we set the basket in the kwargs in express/views.py as follows:

Reload frozen basket which is specified in the URL

    kwargs['basket'] = self.load_frozen_basket(kwargs['basket_id'])
    if not kwargs['basket']:
        logger.warning(
            "Unable to load frozen basket with ID %s", kwargs['basket_id'])
        messages.error(
            self.request,
            _("No basket was found that corresponds to your "
              "PayPal transaction"))
        return HttpResponseRedirect(reverse('basket:summary'))

    logger.info(
        "Basket #%s - showing preview with payer ID %s and token %s",
        kwargs['basket'].id, self.payer_id, self.token)

    return super(SuccessResponseView, self).get(request, *args, **kwargs)

And then in checkout/session.py it tries to pass basket as an explicit argument as well as in the kwargs for build_submission():

def get_context_data(self, *_kwargs):
# Use the proposed submission as template context data. Flatten the
# order kwargs so they are easily available too.
ctx = self.build_submission(
basket=self.request.basket, *_kwargs)
ctx.update(kwargs)
ctx.update(ctx['order_kwargs'])
return ctx

This causes the error shown above. I am using oscar 0.7 and oscar-paypal 0.9.3

Any help is much appreciated!

Thank you.

@codeinthehole
Copy link
Contributor

This was fixed in Oscar 0.7.2 - you should upgrade:
tangentlabs/django-oscar@0.7...0.7.2#diff-6

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

No branches or pull requests

2 participants