Improve validation layer for reports

This commit is contained in:
David Bomba 2022-11-26 12:48:42 +11:00
parent dbdda5dd03
commit 667c1848dc

View File

@ -55,6 +55,12 @@ class GenericReportRequest extends Request
$input['send_email'] = true;
}
if (array_key_exists('date_range', $input) && $input['date_range'] != 'custom') {
$input['start_date'] = null;
$input['end_date'] = null;
}
$this->replace($input);
}
}