Skip to content

Cannot create customer with password #100

@sephii

Description

@sephii

The following code will fail with an error {u'password_confirmation': [u"doesn't match Password"]}:

import shopify

c = shopify.Customer()
c.email = 'foo@bar.com'
c.password = 'foo'
c.password_confirmation = 'foo'
c.save()

c.__dict__ is:

{'errors': <pyactiveresource.activeresource.Errors object at 0x431df10>, '_initialized': True, '_prefix_options': {}, 'klass': <class 'shopify.resources.customer.Customer'>, 'attributes': {'password_confirmation': 'foo', 'email': u'foo@bar.com'}, 'password': 'foo'}

As you can see the password attribute is not in the attributes. A workaround is to set the password in the __init__:

c = shopify.Customer(attributes={'password': 'foo', 'password_confirmation': 'foo'})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions