diff --git a/modules/Platforms/Models/PlatformModel.php b/modules/Platforms/Models/PlatformModel.php index 634255c6..c4d820eb 100644 --- a/modules/Platforms/Models/PlatformModel.php +++ b/modules/Platforms/Models/PlatformModel.php @@ -135,12 +135,10 @@ class PlatformModel extends Model { $this->clearCache($podcastId); - $platforms = service('platforms'); - - $platformsData = $platforms->getPlatformsByType($platformType); - + // delete all platforms given the type to overwrite them with data $this->builder() - ->whereIn('slug', array_keys($platformsData)) + ->where('podcast_id', $podcastId) + ->where('type', $platformType) ->delete(); if ($data === []) {