Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZ.J. van de Weg <git@zjvandeweg.nl>2017-01-26 11:16:07 +0300
committerZ.J. van de Weg <git@zjvandeweg.nl>2017-01-30 13:01:36 +0300
commitb3de65bcc5627915511182a9ac9857b1fef14853 (patch)
tree537c79d5c1f03b1306556b3abf20a5bb3fe565dc /app/controllers/projects/mattermosts_controller.rb
parent8bcc911b9bc9fcb2179860c5a98d8a1ad3ec34b0 (diff)
Update #list_teams to propagate errors
Diffstat (limited to 'app/controllers/projects/mattermosts_controller.rb')
-rw-r--r--app/controllers/projects/mattermosts_controller.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/app/controllers/projects/mattermosts_controller.rb b/app/controllers/projects/mattermosts_controller.rb
index 20161e1cfd8..38f7e6eb5e9 100644
--- a/app/controllers/projects/mattermosts_controller.rb
+++ b/app/controllers/projects/mattermosts_controller.rb
@@ -34,10 +34,7 @@ class Projects::MattermostsController < Projects::ApplicationController
end
def teams
- @teams ||= begin
- teams, error_message = @service.list_teams(current_user)
- error_message ? error_message : teams
- end
+ @teams, @teams_error_message = @service.list_teams(current_user)
end
def service