Skip to content

[ProfileUpdate] Unable to partially change address #29

@garyhtou

Description

@garyhtou

When attempting to change my address, but maintain the same State and Country, I received the following error flash:

If editing address, the following fields are required: addressState, addressCountry

After a quick glance at the code, I believe this is because we're using fields_to_update to check whether all address fields are present. However, fields_to_update only contains changed fields.

This means that if a required address field remains unchanged, it will not be included in fields_to_update and will cause an error.

Instead of fields_to_update we could probably use something like:

current_profile.merge(fields_to_update)

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