Commit 119742cd authored by Yassine Doghri's avatar Yassine Doghri
Browse files

fix(housekeeping): add where clause to check episode_id is not null on reset comments count

parent de8b84c8
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -386,6 +386,7 @@ class EpisodeModel extends UuidModel
            ->select('fediverse_posts.episode_id as episode_id, COUNT(*) as `comments_count`')
            ->join('fediverse_posts as fp', 'fediverse_posts.id = fp.in_reply_to_id')
            ->where('fediverse_posts.in_reply_to_id', null)
            ->where('fediverse_posts.episode_id IS NOT', null)
            ->groupBy('fediverse_posts.episode_id')
            ->getCompiledSelect();