Fixed some tests

This commit is contained in:
Eldad Fux
2021-08-22 17:06:59 +03:00
parent 555d2f7529
commit e39ed9cf9b
3 changed files with 33 additions and 32 deletions
+1 -1
View File
@@ -908,7 +908,7 @@ App::post('/v1/database/collections/:collectionId/indexes')
// set attribute size as length for strings, null otherwise
foreach ($attributes as $key => $attribute) {
// find attribute metadata in collection document
$attributeIndex = \array_search($attribute, array_column($oldAttributes, '$id'));
$attributeIndex = \array_search($attribute, array_column($oldAttributes, 'key'));
if ($attributeIndex === false) {
throw new Exception('Unknown attribute: ' . $attribute, 400);