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

FIX #8407 type_id mandatory only for res_letterbox

parent 1257cc00
No related branches found
No related tags found
No related merge requests found
......@@ -77,7 +77,11 @@ class ResController
return $response->withStatus(400)->withJson(['errors' => 'Bad Request']);
}
$mandatoryColumns = ['type_id'];
$mandatoryColumns = [];
if ($data['table'] == 'res_letterbox') {
array_push($mandatoryColumns, 'type_id');
}
foreach ($data['data'] as $value) {
foreach ($mandatoryColumns as $columnKey => $column) {
if ($column == $value['column'] && !empty($value['value'])) {
......
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