Fallback to default value when migrating value from enum (#6517)
When migrating the option values of a select type, if the field is non nullable (for now, only available for opportunity's "stage" standard field), we fallback to the (potentially updated) default value instead of nullifying the value to avoid getting a database error. --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -18,7 +18,7 @@ export const getCurrencyFieldPreviewValue = ({
|
||||
|
||||
const placeholderDefaultValue = getSettingsFieldTypeConfig(
|
||||
FieldMetadataType.Currency,
|
||||
).defaultValue;
|
||||
).exampleValue;
|
||||
|
||||
return currencyFieldDefaultValueSchema
|
||||
.transform((value) => ({
|
||||
|
||||
Reference in New Issue
Block a user