Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix field creation #7547

Merged
merged 3 commits into from
Oct 10, 2024
Merged

Fix field creation #7547

merged 3 commits into from
Oct 10, 2024

Conversation

ijreilly
Copy link
Collaborator

In this and this PR we introduced the impossibility to save a field that would be non nullable but without a default value.
The check is actually called on the input while the defaultValue is added by the service on a "built" fieldMetadata to create or save. So far all fields created from the app it currently fails as both isNullable and defaultValue are undefined so falsy at that stage.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

API usage limit has reached your account's monthly budget. API requests will be rejected.

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

});
};

this.validateFieldMetadataInput<CreateFieldInput>(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not really a fieldMetadataInput anymore though 😄

@ijreilly ijreilly merged commit b6b7d0e into main Oct 10, 2024
8 checks passed
@ijreilly ijreilly deleted the fix-field-creation branch October 10, 2024 07:38
harshit078 pushed a commit to harshit078/twenty that referenced this pull request Oct 14, 2024
In [this](twentyhq#7522) and
[this](twentyhq#7543) PR we introduced
the impossibility to save a field that would be non nullable but without
a default value.
The check is actually called on the input while the defaultValue is
added by the service on a "built" fieldMetadata to create or save. So
far all fields created from the app it currently fails as both
isNullable and defaultValue are undefined so falsy at that stage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants