Fix to getDirty() when using MD5Updates Trait on attributes

This commit is contained in:
2025-01-16 10:33:45 +11:00
parent 6e06caa83b
commit 960e0de5c8
4 changed files with 4 additions and 24 deletions

View File

@@ -57,16 +57,8 @@ class Entry extends Model
{
$key = $this->normalizeAttributeKey($key);
if ((! array_key_exists($key,$this->original)) && (! $this->objects->has($key)))
return TRUE;
$current = $this->attributes[$key];
$original = $this->objects->get($key)->values;
if ($current === $original)
return TRUE;
return ! $this->getObject($key)->isDirty();
return ((! array_key_exists($key,$this->original)) && (! $this->objects->has($key)))
|| (! $this->getObject($key)->isDirty());
}
public static function query(bool $noattrs=false): Builder