diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 93ec0c287f..7cedb8132e 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -1605,13 +1605,6 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/attributes') $attributes = $collection->getAttribute('attributes'); - foreach ($attributes as &$attribute) { - $options = $attribute->getAttribute('options', []); - foreach ($options as $key => $option) { - $attribute->setAttribute($key, $option); - } - } - $response->dynamic(new Document([ 'total' => \count($attributes), 'attributes' => $attributes diff --git a/tests/e2e/Services/Databases/DatabasesBase.php b/tests/e2e/Services/Databases/DatabasesBase.php index aeffc2cea1..f257561669 100644 --- a/tests/e2e/Services/Databases/DatabasesBase.php +++ b/tests/e2e/Services/Databases/DatabasesBase.php @@ -3277,21 +3277,6 @@ trait DatabasesBase $this->assertEquals('relationship', $relation['body']['type']); $this->assertEquals('processing', $relation['body']['status']); - $attributes = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $person['body']['$id'] . '/attributes', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - 'x-appwrite-key' => $this->getProject()['apiKey'] - ])); - - $this->assertEquals(200, $attributes['headers']['status-code']); - $this->assertEquals(2, $attributes['body']['total']); - $attributes = $attributes['body']['attributes']; - $this->assertEquals('library', $attributes[1]['relatedCollection']); - $this->assertEquals('oneToOne', $attributes[1]['relationType']); - $this->assertEquals(false, $attributes[1]['twoWay']); - $this->assertEquals('person', $attributes[1]['twoWayKey']); - $this->assertEquals(Database::RELATION_MUTATE_CASCADE, $attributes[1]['onDelete']); - $attribute = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/collections/{$person['body']['$id']}/attributes/library", array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'],