From aef23ff7aee6be7c00b887d64b111f88b2750491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89lie=20Bouttier?= Date: Tue, 2 Sep 2014 21:36:03 -0700 Subject: [PATCH] redirect to profile if no email when subscribe --- templates/base_project.html | 4 +++- templates/tracker/issue_details.html | 2 +- tracker/views.py | 8 ++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/templates/base_project.html b/templates/base_project.html index 3fa4a5b..9b9b11a 100644 --- a/templates/base_project.html +++ b/templates/base_project.html @@ -19,11 +19,13 @@ {% endcomment %} -{% if request.user in project.subscribers.all %} +{% if request.user.is_authenticated %} +{% if request.user.email and request.user in project.subscribers.all %}
  • Unwatch
  • {% else %}
  • Watch
  • {% endif %} +{% endif %} {% if perm.manage_project_permission or perm.modify_project or perm.delete_project %}