fix(episode-form): render episode number optional when episode type is trailer or bonus

This commit is contained in:
Yassine Doghri 2023-12-12 15:45:38 +00:00
parent f5189055ff
commit 694328f108
1 changed files with 2 additions and 2 deletions

View File

@ -164,7 +164,7 @@ class EpisodeController extends BaseController
'chapters_file' => 'ext_in[chapters,json]|permit_empty',
];
if ($this->podcast->type === 'serial') {
if ($this->podcast->type === 'serial' && $this->request->getPost('type') === 'full') {
$rules['episode_number'] = 'required';
}
@ -301,7 +301,7 @@ class EpisodeController extends BaseController
'chapters_file' => 'ext_in[chapters_file,json]|permit_empty',
];
if ($this->podcast->type === 'serial') {
if ($this->podcast->type === 'serial' && $this->request->getPost('type') === 'full') {
$rules['episode_number'] = 'required';
}