Skip to content

Commit 2e3c0ca

Browse files
authored
Bug fix for missing user entry (#69)
1 parent 4f95009 commit 2e3c0ca

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

website/views.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,13 +272,14 @@ def question_answer(request):
272272
notification.qid = qid
273273
notification.aid = answer.id
274274
notification.save()
275-
user = User.objects.get(id=question.uid)
275+
276276

277277
# Sending email when an answer is posted and user answering the question has verified role in spoken
278278
try:
279279
ans_user = User.objects.get(id=answer.uid)
280280
user_has_role = has_role(ans_user)
281281
if user_has_role:
282+
user = User.objects.get(id=question.uid)
282283
subject = 'Question has been answered'
283284
message = """
284285
Dear {0}<br><br>

0 commit comments

Comments
 (0)