Skip alias type change check when type is not updated (#16270)

This commit is contained in:
ian
2022-11-02 20:54:35 +08:00
committed by GitHub
parent b5d7db2ea0
commit ca2c761bde

View File

@@ -364,6 +364,7 @@ export class FieldsService {
if (
(hookAdjustedField.type === 'alias' ||
this.schema.collections[collection].fields[field.field].type === 'alias') &&
hookAdjustedField.type &&
hookAdjustedField.type !== this.schema.collections[collection].fields[field.field].type
) {
throw new InvalidPayloadException('Alias type cannot be changed');