mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 17:08:45 +00:00
Update src/Appwrite/Databases/TransactionState.php
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
parent
93d8f1cfe7
commit
9813b98133
1 changed files with 3 additions and 1 deletions
|
|
@ -79,7 +79,9 @@ class TransactionState
|
|||
break;
|
||||
|
||||
case 'upsert':
|
||||
$state[$collectionId][$documentId] = [
|
||||
$docId = $documentId ?? ($data['$id'] ?? null);
|
||||
if (!$docId) { break; }
|
||||
$state[$collectionId][$docId] = [
|
||||
'action' => 'upsert',
|
||||
'document' => new Document($data),
|
||||
'exists' => true
|
||||
|
|
|
|||
Loading…
Reference in a new issue