diff options
author | Phil Hughes <me@iamphill.com> | 2016-06-07 10:54:02 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-06-14 08:36:07 +0100 |
commit | 04c199a0ab2db012e8c5a190ce2836f22e846305 (patch) | |
tree | a009c654e89fa5155d071c8888943f586c3c578e /app/helpers | |
parent | a1be3241ec1f91182435a10615beac15fcfe235a (diff) | |
download | gitlab-ce-04c199a0ab2db012e8c5a190ce2836f22e846305.tar.gz |
Fixed bug with sidebar when user is not logged in
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/issuables_helper.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb index 88ef1a6468c..2ae7f5c5f32 100644 --- a/app/helpers/issuables_helper.rb +++ b/app/helpers/issuables_helper.rb @@ -78,7 +78,9 @@ module IssuablesHelper end def has_todo(issuable) - current_user.todos.find_by(target_id: issuable.id, state: :pending) + unless current_user.nil? + current_user.todos.find_by(target_id: issuable.id, state: :pending) + end end private |