From 5d57928bc9573a637e60333423005a7e16849f26 Mon Sep 17 00:00:00 2001
From: Sandeep Chauhan <sandeepsajan0@gmail.com>
Date: Wed, 27 Mar 2024 23:33:56 +0530
Subject: [PATCH] Allow unassign staff reviewers only for inactive reviewers
 (#3807)

Fixes #3553
---
 hypha/apply/funds/forms.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hypha/apply/funds/forms.py b/hypha/apply/funds/forms.py
index 3921248b0..477b4605b 100644
--- a/hypha/apply/funds/forms.py
+++ b/hypha/apply/funds/forms.py
@@ -310,7 +310,7 @@ class UpdateReviewersForm(ApplicationSubmissionModelForm):
             ).last()
             if (
                 assigned_reviewer
-                and not cleaned_data[field]
+                and (not cleaned_data[field] and assigned_reviewer.reviewer.is_active)
                 and assigned_reviewer.reviewer in self.submitted_reviewers
             ):
                 self.add_error(
-- 
GitLab