mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Fix check for alias fields (#16282)
They do not exist on fields definition
This commit is contained in:
@@ -363,9 +363,9 @@ export class FieldsService {
|
||||
|
||||
if (
|
||||
(hookAdjustedField.type === 'alias' ||
|
||||
this.schema.collections[collection].fields[field.field].type === 'alias') &&
|
||||
this.schema.collections[collection].fields[field.field]?.type === 'alias') &&
|
||||
hookAdjustedField.type &&
|
||||
hookAdjustedField.type !== this.schema.collections[collection].fields[field.field].type
|
||||
hookAdjustedField.type !== this.schema.collections[collection].fields[field.field]?.type
|
||||
) {
|
||||
throw new InvalidPayloadException('Alias type cannot be changed');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user