mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
Fix operator parsing on txn ops
This commit is contained in:
parent
ae21fadf0d
commit
c9582978ed
4 changed files with 12 additions and 4 deletions
|
|
@ -107,7 +107,9 @@ class Update extends Action
|
|||
throw new Exception($this->getParentNotFoundException());
|
||||
}
|
||||
|
||||
$data = $this->parseOperators($data, $collection);
|
||||
if ($transactionId === null) {
|
||||
$data = $this->parseOperators($data, $collection);
|
||||
}
|
||||
|
||||
$hasRelationships = \array_filter(
|
||||
$collection->getAttribute('attributes', []),
|
||||
|
|
|
|||
|
|
@ -107,7 +107,9 @@ class Upsert extends Action
|
|||
}
|
||||
|
||||
foreach ($documents as $key => $document) {
|
||||
$document = $this->parseOperators($document, $collection);
|
||||
if ($transactionId === null) {
|
||||
$document = $this->parseOperators($document, $collection);
|
||||
}
|
||||
$document = $this->removeReadonlyAttributes($document, privileged: true);
|
||||
$documents[$key] = new Document($document);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,7 +112,9 @@ class Update extends Action
|
|||
throw new Exception($this->getParentNotFoundException());
|
||||
}
|
||||
|
||||
$data = $this->parseOperators($data, $collection);
|
||||
if ($transactionId === null) {
|
||||
$data = $this->parseOperators($data, $collection);
|
||||
}
|
||||
|
||||
// Read permission should not be required for update
|
||||
/** @var Document $document */
|
||||
|
|
|
|||
|
|
@ -118,7 +118,9 @@ class Upsert extends Action
|
|||
throw new Exception($this->getParentNotFoundException());
|
||||
}
|
||||
|
||||
$data = $this->parseOperators($data, $collection);
|
||||
if ($transactionId === null) {
|
||||
$data = $this->parseOperators($data, $collection);
|
||||
}
|
||||
|
||||
$allowedPermissions = [
|
||||
Database::PERMISSION_READ,
|
||||
|
|
|
|||
Loading…
Reference in a new issue