Skip to content

Commit

Permalink
use getRelationObject()
Browse files Browse the repository at this point in the history
  • Loading branch information
mjauvin committed Dec 5, 2024
1 parent b78a938 commit 5da0c7a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules/backend/formwidgets/TagList.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ protected function hydrateRelationSaveValue($names): ?array
$names = [$names];
}

list($model, $attribute) = $this->resolveModelAttribute($this->formField->fieldName);
$relation = $model->{$attribute}();
$relation = $this->getRelationObject();
$relationModel = $this->getRelationModel();

$existingTags = $relation->lists($this->nameFrom, $relationModel->getKeyName());
Expand Down

0 comments on commit 5da0c7a

Please sign in to comment.