From 4a72b91c14bb118e8d4e7a3b5deeb598dd03fe3d Mon Sep 17 00:00:00 2001
From: Fredrik Jonsson <frjo@xdeb.org>
Date: Sat, 13 Jul 2019 11:57:01 +0200
Subject: [PATCH] Bugfix for notification to second reviewer.

---
 opentech/apply/activity/messaging.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/opentech/apply/activity/messaging.py b/opentech/apply/activity/messaging.py
index 83a7ed9af..faaa386f3 100644
--- a/opentech/apply/activity/messaging.py
+++ b/opentech/apply/activity/messaging.py
@@ -399,7 +399,7 @@ class SlackAdapter(AdapterBase):
 
         # Notify second reviewer when first reviewer is done.
         if message_type == MESSAGES.NEW_REVIEW and related:
-            if submission.assigned.with_roles().count() == 2 and related.author == submission.assigned.with_roles().first().reviewer:
+            if submission.assigned.with_roles().count() == 2 and related.author.reviewer == submission.assigned.with_roles().first().reviewer:
                 recipients.append(self.slack_id(submission.assigned.with_roles().last().reviewer))
 
         return recipients
-- 
GitLab