Skip to content

Commit

Permalink
fix enum default value update when option deleted (#7604)
Browse files Browse the repository at this point in the history
Fix as isDefined also returns false if value is null and we still want
to allow users to set defaultValue back to null
  • Loading branch information
Weiko authored Oct 11, 2024
1 parent c91a8c6 commit 8cf3262
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ export const computeFilterParameters = (): OpenAPIV3_1.ParameterObject => {
).join('**, **')}**.
Default root conjunction is **${DEFAULT_CONJUNCTION}**.
To filter **null** values use **field[is]:NULL** or **field[is]:NOT_NULL**
To filter using **boolean** values use **field[eq]:true** or **field[eq]:false**
`,
To filter using **boolean** values use **field[eq]:true** or **field[eq]:false**`,

required: false,
schema: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,10 @@ export class FieldMetadataService extends TypeOrmQueryService<FieldMetadataEntit

const fieldMetadataForUpdate = {
...updatableFieldInput,
defaultValue: isDefined(updatableFieldInput.defaultValue)
? updatableFieldInput.defaultValue
: existingFieldMetadata.defaultValue,
defaultValue:
updatableFieldInput.defaultValue !== undefined
? updatableFieldInput.defaultValue
: existingFieldMetadata.defaultValue,
};

this.validateFieldMetadata<UpdateFieldInput>(
Expand Down

0 comments on commit 8cf3262

Please sign in to comment.