From 0418530ad3956f02408d4a06ff33151f996480fc Mon Sep 17 00:00:00 2001
From: George Katsikas <giorgakis.katsikas@gmail.com>
Date: Mon, 21 Aug 2023 11:46:31 +0200
Subject: [PATCH] fix referee auto-reminders toggling

---
 scipost_django/submissions/views/__init__.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scipost_django/submissions/views/__init__.py b/scipost_django/submissions/views/__init__.py
index d2e7df12b..8e1233c83 100644
--- a/scipost_django/submissions/views/__init__.py
+++ b/scipost_django/submissions/views/__init__.py
@@ -1278,10 +1278,10 @@ def invite_referee(request, identifier_w_vn_nr, profile_id, auto_reminders_allow
 def set_refinv_auto_reminder(request, invitation_id, auto_reminders):
     """Set the value of the Boolean for automatic refereeing reminders."""
     invitation = get_object_or_404(RefereeInvitation, pk=invitation_id)
-    if auto_reminders == "0":
+    if auto_reminders == 0:
         invitation.auto_reminders_allowed = False
         messages.success(request, "Auto reminders succesfully turned off.")
-    elif auto_reminders == "1":
+    elif auto_reminders == 1:
         invitation.auto_reminders_allowed = True
         messages.success(request, "Auto reminders succesfully turned on.")
     else:
-- 
GitLab