mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
Fix array conversion
This commit is contained in:
parent
46d785bbb8
commit
37f16ef0bb
1 changed files with 4 additions and 4 deletions
|
|
@ -160,6 +160,10 @@ class Update extends Action
|
|||
$action = $operation['action'];
|
||||
$data = $operation['data'];
|
||||
|
||||
if ($data instanceof Document) {
|
||||
$data = $data->getArrayCopy();
|
||||
}
|
||||
|
||||
if (!isset($collections[$collectionId])) {
|
||||
$collections[$collectionId] = Authorization::skip(
|
||||
fn () => $dbForProject->getCollection($collectionId)
|
||||
|
|
@ -184,10 +188,6 @@ class Update extends Action
|
|||
$databaseOperations[$databaseInternalId] = ($databaseOperations[$databaseInternalId] ?? 0) + 1;
|
||||
}
|
||||
|
||||
if ($data instanceof Document) {
|
||||
$data = $data->getArrayCopy();
|
||||
}
|
||||
|
||||
switch ($action) {
|
||||
case 'create':
|
||||
$this->handleCreateOperation($dbForProject, $collectionId, $documentId, $data, $createdAt, $state);
|
||||
|
|
|
|||
Loading…
Reference in a new issue