diff --git a/app/Http/Requests/Report/GenericReportRequest.php b/app/Http/Requests/Report/GenericReportRequest.php index c197b21d7670..208e53aac682 100644 --- a/app/Http/Requests/Report/GenericReportRequest.php +++ b/app/Http/Requests/Report/GenericReportRequest.php @@ -36,4 +36,15 @@ class GenericReportRequest extends Request 'send_email' => 'required|bool', ]; } + + public function prepareForValidation() + { + $input = $this->all(); + + + if(!array_key_exists('report_keys', $input)) + $input['report_keys'] = []; + + $this->replace($input); + } }