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

Signature of Repository.get_shipping_methods #99

Closed
st8st8 opened this issue Jun 4, 2015 · 2 comments
Closed

Signature of Repository.get_shipping_methods #99

st8st8 opened this issue Jun 4, 2015 · 2 comments

Comments

@st8st8
Copy link

st8st8 commented Jun 4, 2015

Line 447 of paypal/express/views.py calls repo.get_shipping_methods with the signature:

def get_shipping_methods(self, user, basket, shipping_address):
    repo = Repository()
    return repo.get_shipping_methods(
        user, basket, shipping_addr=shipping_address)

But in oscar/apps/shipping/repository.py it's given as:

# API
def get_shipping_methods(self, basket, shipping_addr=None, **kwargs):

ie with no "user" argument. I'm not sure which is correct?

@maiksprenger
Copy link
Member

Good catch. The signature changed with Oscar 1.1. I'll fix it and will issue a release no later than next week.

@maiksprenger
Copy link
Member

FYI, my work-in-progress branch is at #113.

maiksprenger added a commit that referenced this issue Nov 5, 2015
get_shipping_methods was called with different parameters in different
parts of the code. This commit now changes things to call it with as
much information as is available at the time, hence always including the
request and the basket. It also uses named keyword arguments to make
backwards compatibility easier (as the method signature obviously
changed).

Closes #99.
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

2 participants