From fa7bdc2a65c1480fe84b966d65461aba217baa16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Delattre?= Date: Mon, 30 Aug 2021 10:34:23 -1000 Subject: [PATCH] Fix panic while refreshing episode --- backend/shows/handlers.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/shows/handlers.go b/backend/shows/handlers.go index 3ee5405..c3fb830 100644 --- a/backend/shows/handlers.go +++ b/backend/shows/handlers.go @@ -306,6 +306,10 @@ func RefreshEpisodeHandler(env *web.Env, w http.ResponseWriter, r *http.Request) env.Log.Warnf("Error getting show %q", err) } + if pShow == nil { + pShow = &papi.Show{Show: &polochon.Show{ImdbID: id}} + } + s := &Show{ Show: pShow.Show, client: client,