Skip to content
Snippets Groups Projects
Commit 7cda51b3 authored by Florian Azizian's avatar Florian Azizian
Browse files

FEAT #11982 TIME 0:10 migrate custom field array instead of null

parent 8bd0a4d2
No related branches found
No related tags found
No related merge requests found
...@@ -48,7 +48,6 @@ foreach ($customs as $custom) { ...@@ -48,7 +48,6 @@ foreach ($customs as $custom) {
} }
} }
if (!empty($value->table) && !empty($value->table->table_name) && !empty($value->table->foreign_label)) { if (!empty($value->table) && !empty($value->table->table_name) && !empty($value->table->foreign_label)) {
$tableName = (string)$value->table->table_name; $tableName = (string)$value->table->table_name;
$foreignLabel = (string)$value->table->foreign_label; $foreignLabel = (string)$value->table->foreign_label;
$whereClause = (string)$value->table->where_clause; $whereClause = (string)$value->table->where_clause;
...@@ -69,7 +68,7 @@ foreach ($customs as $custom) { ...@@ -69,7 +68,7 @@ foreach ($customs as $custom) {
$fieldId = \CustomField\models\CustomFieldModel::create([ $fieldId = \CustomField\models\CustomFieldModel::create([
'label' => $label, 'label' => $label,
'type' => $type, 'type' => $type,
'values' => empty($values) ? null : json_encode($values) 'values' => empty($values) ? '[]' : json_encode($values)
]); ]);
$column = (string)$value->column; $column = (string)$value->column;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment