From cbf56ecd5bb936420f2027e8d9991be21551a788 Mon Sep 17 00:00:00 2001 From: Jorran de Wit <jorrandewit@outlook.com> Date: Tue, 3 Oct 2017 13:38:23 +0200 Subject: [PATCH] Fix User instance not found in signal --- submissions/signals.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submissions/signals.py b/submissions/signals.py index 664ff585d..d14134ba0 100644 --- a/submissions/signals.py +++ b/submissions/signals.py @@ -45,7 +45,7 @@ def notify_new_referee_invitation(sender, instance, created, **kwargs): """ Notify a Referee about a new refereeing invitation. """ - if created: + if created and instance.referee: notify.send(sender=sender, recipient=instance.referee.user, actor=instance.submission.editor_in_charge, verb=' would like to invite you to referee a Submission.', target=instance) -- GitLab