diff --git a/modules/backend/formwidgets/Relation.php b/modules/backend/formwidgets/Relation.php index bfd8d97b7..dec7687eb 100644 --- a/modules/backend/formwidgets/Relation.php +++ b/modules/backend/formwidgets/Relation.php @@ -113,9 +113,10 @@ class Relation extends FormWidgetBase } elseif (in_array($this->relationType, ['belongsTo', 'hasOne'])) { $field->type = 'dropdown'; - $field->placeholder = $this->emptyOption; } + $field->placeholder = $this->emptyOption; + // It is safe to assume that if the model and related model are of // the exact same class, then it cannot be related to itself if ($model->exists && (get_class($model) == get_class($relatedObj))) {