summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-06-17 09:10:23 +0100
committerPhil Hughes <me@iamphill.com>2016-06-17 09:10:23 +0100
commit7c95dc41ef133f4d8e1ec43ea9aab2ef537b9568 (patch)
tree84b212d75ee2291bc9c21324c834f94ac3ef898b
parentb56965c5bb6a92b7bf4a7158c5f9555b7c1a9e2b (diff)
downloadgitlab-ce-7c95dc41ef133f4d8e1ec43ea9aab2ef537b9568.tar.gz
Checks for current_user when getting todo
-rw-r--r--app/helpers/issuables_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb
index 8ad45e24f35..8231ce49fac 100644
--- a/app/helpers/issuables_helper.rb
+++ b/app/helpers/issuables_helper.rb
@@ -68,7 +68,7 @@ module IssuablesHelper
end
def issuable_todo(issuable)
- if issuable
+ if current_user
current_user.todos.find_by(target: issuable, state: :pending)
end
end