Merge pull request #158 from christopherdarling/patch-1

This commit is contained in:
Guy Marriott 2020-05-06 12:28:42 -07:00 committed by GitHub
commit 3b6ec92e66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -380,8 +380,6 @@ class TagField extends MultiSelectField
$titleField = $this->getTitleField();
$values = $this->Value();
/** @var Relation $relation */
$relation = $record->$name();
$ids = [];
if (!$values) {
@ -398,6 +396,9 @@ class TagField extends MultiSelectField
);
}
/** @var Relation $relation */
$relation = $record->$name();
foreach ($values as $key => $value) {
// Get or create record
$record = $this->getOrCreateTag($value);