Skip to content

defaultValue should work with default locale of space if locale doesn't exist #1476

@sayjeyhi

Description

@sayjeyhi

Hi,

When working with multiple spaces with different locales, having same migration files ends up is a situation when we have a migration to run for space A with locale z and space B can run it because it doesn't have locale z.

sample:

field.defaultValue({ 'en-GB': 'primary' })

Error:

Cannot set default value for locale "en-GB" on field "XXXX". The locale does not exist.

Proposal:

  • accept a default locale on runMigration method and handle this.
  • change the defaultValue method to have some generic approach

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