summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-03-15 18:28:25 +0000
committerPhil Hughes <me@iamphill.com>2016-03-16 08:41:55 +0000
commit2e07ee7f01e9bd525c98ae3f84025dd8699fdf8a (patch)
treed16c94a70892c8c33aa6e8beb1d3219d7e42d949
parentdce43b4bea88c753c6aeb43d2d283bef4d11eff1 (diff)
downloadgitlab-ce-2e07ee7f01e9bd525c98ae3f84025dd8699fdf8a.tar.gz
Fixed failing tests
-rw-r--r--app/helpers/issuables_helper.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb
index 29b78ac9100..b254c62da26 100644
--- a/app/helpers/issuables_helper.rb
+++ b/app/helpers/issuables_helper.rb
@@ -23,7 +23,8 @@ module IssuablesHelper
def user_dropdown_label(user_id, default_label)
return "Unassigned" if user_id == "0"
- user = @project.team.users.find_by(id: user_id)
+ user = @project.team.users.find_by(id: user_id) if @project
+ user = User.find_by_id(user_id) if !@project
if user
user.name