Merge pull request #8624 from appwrite/fix-tenant-not-removed
Remove tenant in document filter
This commit is contained in:
commit
f9992c2f64
21 changed files with 40 additions and 38 deletions
|
@ -72,7 +72,8 @@ class Document extends Any
|
|||
public function filter(DatabaseDocument $document): DatabaseDocument
|
||||
{
|
||||
$document->removeAttribute('$internalId');
|
||||
$document->removeAttribute('$collection'); // $collection is the internal collection ID
|
||||
$document->removeAttribute('$collection');
|
||||
$document->removeAttribute('$tenant');
|
||||
|
||||
foreach ($document->getAttributes() as $attribute) {
|
||||
if (\is_array($attribute)) {
|
||||
|
|
|
@ -1593,6 +1593,7 @@ trait DatabasesBase
|
|||
$this->assertEquals($response['body']['$permissions'], $document['$permissions']);
|
||||
$this->assertEquals($response['body']['birthDay'], $document['birthDay']);
|
||||
$this->assertFalse(array_key_exists('$internalId', $response['body']));
|
||||
$this->assertFalse(array_key_exists('$tenant', $response['body']));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue