mirror of
https://github.com/silverstripe/silverstripe-tagfield
synced 2024-07-01 00:49:19 +02:00
Merge branch '2.4' into 2
This commit is contained in:
commit
9f11be6a04
|
@ -380,8 +380,6 @@ class TagField extends MultiSelectField
|
||||||
$titleField = $this->getTitleField();
|
$titleField = $this->getTitleField();
|
||||||
$values = $this->Value();
|
$values = $this->Value();
|
||||||
|
|
||||||
/** @var Relation $relation */
|
|
||||||
$relation = $record->$name();
|
|
||||||
$ids = [];
|
$ids = [];
|
||||||
|
|
||||||
if (!$values) {
|
if (!$values) {
|
||||||
|
@ -398,6 +396,9 @@ class TagField extends MultiSelectField
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @var Relation $relation */
|
||||||
|
$relation = $record->$name();
|
||||||
|
|
||||||
foreach ($values as $key => $value) {
|
foreach ($values as $key => $value) {
|
||||||
// Get or create record
|
// Get or create record
|
||||||
$record = $this->getOrCreateTag($value);
|
$record = $this->getOrCreateTag($value);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user