Commit b3098e0c authored by Florian Azizian's avatar Florian Azizian

FIX sve_start_date in first position

parent 5fd2d2a1
......@@ -765,11 +765,16 @@ class ResController
$select = explode(',', $data['select']);
$sve_start_date = false;
if ($keySve = array_search('sve_start_date', array_map('trim', $select))) {
$keySve = array_search('sve_start_date', array_map('trim', $select));
if ($keySve !== false) {
unset($select[$keySve]);
$sve_start_date = true;
}
if ($sve_start_date && empty($select)) {
$select[] = 'res_id';
}
if (!PreparedClauseController::isRequestValid(['select' => $select, 'clause' => $data['clause'], 'orderBy' => $data['orderBy'], 'limit' => $data['limit'], 'userId' => $GLOBALS['userId']])) {
return $response->withStatus(400)->withJson(['errors' => _INVALID_REQUEST]);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment