Skip to content

Commit a9bf14f

Browse files
authored
Merge pull request Insolita#20 from SOHELAHMED7/patch-1
Clone original model
2 parents c941655 + 8781f56 commit a9bf14f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/actions/UpdateAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function run($id):Item
9292
if ($this->checkAccess) {
9393
call_user_func($this->checkAccess, $this->id, $model);
9494
}
95-
$originalModel = $model;
95+
$originalModel = clone $model;
9696
RelationshipManager::validateRelationships($model, $this->getResourceRelationships(), $this->allowedRelations);
9797
if (empty($this->getResourceAttributes()) && $this->hasResourceRelationships()) {
9898
$transact = $model::getDb()->beginTransaction();

0 commit comments

Comments
 (0)