Halcyon models don't support relations
Use a simple fill() approach instead of trying to set nested fields via their relations Refs https://github.com/rainlab/translate-plugin/issues/216
This commit is contained in:
parent
dc85993584
commit
3365aee129
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
use Str;
|
||||
use Backend\Classes\FormField;
|
||||
use October\Rain\Halcyon\Model as HalcyonModel;
|
||||
use October\Rain\Database\Model as DatabaseModel;
|
||||
|
||||
/**
|
||||
* Form Model Saver Trait
|
||||
|
|
@ -50,6 +52,11 @@ trait FormModelSaver
|
|||
return;
|
||||
}
|
||||
|
||||
if ($model instanceof HalcyonModel) {
|
||||
$model->fill($saveData);
|
||||
return;
|
||||
}
|
||||
|
||||
$attributesToPurge = [];
|
||||
$singularTypes = ['belongsTo', 'hasOne', 'morphOne'];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue