Don't allow contains on a UUID

Fixes #5802
This commit is contained in:
rijkvanzanten
2021-05-21 20:39:09 -04:00
parent a5cba0dc7e
commit 4beccb6a8a
2 changed files with 10 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
'@directus/app': patch
---
Don't allow contains on a UUID type

View File

@@ -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 {