diff --git a/.changeset/tricky-bugs-listen.md b/.changeset/tricky-bugs-listen.md new file mode 100644 index 0000000000..6ef6fffbd6 --- /dev/null +++ b/.changeset/tricky-bugs-listen.md @@ -0,0 +1,5 @@ +--- +'@directus/app': patch +--- + +Don't allow contains on a UUID type diff --git a/app/src/views/private/components/filter-sidebar-detail/get-available-operators-for-type.ts b/app/src/views/private/components/filter-sidebar-detail/get-available-operators-for-type.ts index 5990d183e8..9167683521 100644 --- a/app/src/views/private/components/filter-sidebar-detail/get-available-operators-for-type.ts +++ b/app/src/views/private/components/filter-sidebar-detail/get-available-operators-for-type.ts @@ -15,13 +15,17 @@ export default function getAvailableOperatorsForType(type: string): OperatorType case 'status': case 'slug': case 'lang': - case 'uuid': case 'hash': case 'string': return { type: 'text', operators: ['contains', 'ncontains', 'eq', 'neq', 'empty', 'nempty', 'in', 'nin'], }; + case 'uuid': + return { + type: 'text', + operators: ['eq', 'neq', 'empty', 'nempty', 'in', 'nin'], + }; // Boolean case 'boolean': return {