fix: Fall back to the ID if no title is given

This commit is contained in:
Roman Schmid 2022-07-26 10:47:13 +02:00
parent 560a1398ab
commit 8da9f83cde

View File

@ -403,7 +403,7 @@ class TagField extends MultiSelectField
}
if ($values instanceof DataObject && $values->exists()) {
return [$values->{$this->getTitleField()}];
return [$values->{$this->getTitleField()} ?? $values->ID];
}
if (is_int($values)) {