fix(import): check for empty string when generating podcast guid for feeds not including one

This commit is contained in:
Yassine Doghri 2023-12-26 15:52:46 +00:00
parent 1001ec6b76
commit ac5336fbc5
1 changed files with 4 additions and 1 deletions

View File

@ -502,7 +502,10 @@ class PodcastModel extends Model
*/
protected function setPodcastGUID(array $data): array
{
if (! array_key_exists('guid', $data['data']) || $data['data']['guid'] === null) {
if (! array_key_exists(
'guid',
$data['data']
) || $data['data']['guid'] === null || $data['data']['guid'] === '') {
$uuid = service('uuid');
$feedUrl = url_to('podcast-rss-feed', $data['data']['handle']);
// 'ead4c236-bf58-58c6-a2c6-a6b28d128cb6' is the uuid of the podcast namespace