Skip to content

Commit ed2ccc1

Browse files
committed
Only on new document
1 parent 279a8ba commit ed2ccc1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Database/Database.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4969,7 +4969,6 @@ public function createOrUpdateDocumentsWithIncrease(
49694969
throw new AuthorizationException($validator->getDescription());
49704970
}
49714971

4972-
$createdAt = $document->getCreatedAt();
49734972
$updatedAt = $document->getUpdatedAt();
49744973

49754974
$document
@@ -4978,6 +4977,7 @@ public function createOrUpdateDocumentsWithIncrease(
49784977
->setAttribute('$updatedAt', empty($updatedAt) || !$this->preserveDates ? $time : $updatedAt);
49794978

49804979
if ($old->isEmpty()) {
4980+
$createdAt = $document->getCreatedAt();
49814981
$document->setAttribute('$createdAt', empty($createdAt) || !$this->preserveDates ? $time : $createdAt);
49824982
}
49834983

0 commit comments

Comments
 (0)