Fix import, missing sprintf() and should use has() not contains()

This commit is contained in:
2025-02-16 13:45:22 +11:00
parent f82cf33f7f
commit 724a2f02be
2 changed files with 3 additions and 3 deletions

View File

@@ -146,8 +146,8 @@ class Entry extends Model
{
$key = $this->normalizeAttributeKey($key);
if (! config('server')->schema('attributetypes')->contains($key))
throw new AttributeException('Schema doesnt have attribute [%s]',$key);
if (! config('server')->schema('attributetypes')->has($key))
throw new AttributeException(sprintf('Schema doesnt have attribute [%s]',$key));
if ($x=$this->objects->get($key)) {
$x->addValue($value);