Skip to content

Commit 276d181

Browse files
committed
fix object isModified
1 parent 339a84a commit 276d181

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Model/BaseModel.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@ public function isDeleted(): bool
3131

3232
public function isModified(): bool
3333
{
34-
return $this->objectStatusHash !== $this->getObjectStatusHash();
34+
return !$this->isNew() && !$this->isDeleted()
35+
&& $this->objectStatusHash !== $this->getObjectStatusHash();
3536
}
3637

3738
public function isNew(): bool
3839
{
3940
return $this->objectStatusHash === self::STATUS_NEW;
4041
}
41-
}
42+
}

0 commit comments

Comments
 (0)