fix custom field checkbox

This commit is contained in:
xiaomlove
2022-11-16 17:37:42 +08:00
parent fad1f9c295
commit 1ee9a0c869

View File

@@ -403,7 +403,7 @@ JS;
}
$result[$row['torrent_id']][$row['id']] = $row;
if ($typeInfo['is_value_multiple']) {
$values[$row['torrent_id']][$row['id']][] = $row['custom_field_value'];
$values[$row['torrent_id']][$row['id']] = json_decode($row['custom_field_value'], true);
} else {
$values[$row['torrent_id']][$row['id']] = $row['custom_field_value'];
}
@@ -529,7 +529,7 @@ JS;
$insert[] = [
'torrent_id' => $torrentId,
'custom_field_id' => $field->id,
'custom_field_value' => $data[$field->id],
'custom_field_value' => is_array($data[$field->id]) ? json_encode($data[$field->id]) : $data[$field->id],
'created_at' => $now,
'updated_at' => $now,
];