Skip to content

Unable to set default_currency to nil #697

Open
@sirwolfgang

Description

@sirwolfgang

Noticed an issue where in our system an edge case would cause the default currency of USD to get applied. Generally we want to be strict, and not risk a default value. When I attempted to set the default_currency to nil this started to error.

Based on this message I found while debugging [WARNING] The default currency will change from 'USD' to 'nil' in the next major release., it doesn't sound like it's intended to prevent the removal of a default.

I've prepared two PRs that make the required adjustments to allow nil to be used as a default value, that triggers NoCurrency error.

This will allow strictly defined systems to operate without risk of unexpected currencies.

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