Merge branch 'feat-txn' of github.com:appwrite/appwrite into feat-txn

This commit is contained in:
Jake Barnby 2025-10-04 16:49:27 +13:00
commit 17a5019606
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C

View file

@ -651,8 +651,9 @@ class Update extends Action
}
// Use timestamp wrapper for independent operations
$dbForProject->withRequestTimestamp($createdAt, function () use ($dbForProject, $collectionId, $documentId, $data) {
$dbForProject->decreaseDocumentAttribute(
// Use timestamp wrapper for independent operations
$dbForProject->withRequestTimestamp($createdAt, function () use ($dbForProject, $collectionId, $documentId, $data, &$state) {
$state[$collectionId][$documentId] = $dbForProject->decreaseDocumentAttribute(
collection: $collectionId,
id: $documentId,
attribute: $data[$this->getAttributeKey()],