From c3a42663a2657ab49e3305acf6240731588ba6b6 Mon Sep 17 00:00:00 2001 From: Ptitloup Date: Mon, 25 Sep 2023 15:08:55 +0200 Subject: [PATCH] fix stats_views --- pod/video/tests/test_stats_view.py | 2 +- pod/video/views.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pod/video/tests/test_stats_view.py b/pod/video/tests/test_stats_view.py index 63ae9f39b8..c8d3981f03 100644 --- a/pod/video/tests/test_stats_view.py +++ b/pod/video/tests/test_stats_view.py @@ -172,7 +172,7 @@ def test_stats_view_GET_request_videos(self): @skipUnless(USE_STATS_VIEW, "Require acitvate URL video_stats_view") def test_stats_view_GET_request_channel(self): - print("ABCDE " + self.stat_channel_url) + # print("ABCDE " + self.stat_channel_url) response = self.client.get(self.stat_channel_url) # Check that the view function is stats_view self.assertEqual(response.resolver_match.func, stats_view) diff --git a/pod/video/views.py b/pod/video/views.py index 63f790c124..7c55829aff 100644 --- a/pod/video/views.py +++ b/pod/video/views.py @@ -2227,7 +2227,8 @@ def stats_view(request, slug=None, slug_t=None): request.method == "POST" and target == "video" and ( - request.POST.get("password") == videos[0].password + request.POST.get("password") + and request.POST.get("password") == videos[0].password # and check_password(request.POST.get("password"), videos[0].password) ) ) or (