From ed85daf2ac9e4f06ae5746bda0f5f1cf8a15fd43 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Sat, 1 Dec 2018 13:39:28 -0500 Subject: [PATCH] User: jobs tab returns its error as a lazy error. --- src/lib/Hydra/Controller/User.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/Hydra/Controller/User.pm b/src/lib/Hydra/Controller/User.pm index e9953a83..cad19d78 100644 --- a/src/lib/Hydra/Controller/User.pm +++ b/src/lib/Hydra/Controller/User.pm @@ -349,9 +349,10 @@ sub dashboard :Chained('dashboard_base') :PathPart('') :Args(0) { sub my_jobs_tab :Chained('dashboard_base') :PathPart('my-jobs-tab') :Args(0) { my ($self, $c) = @_; + $c->stash->{lazy} = 1; $c->stash->{template} = 'dashboard-my-jobs-tab.tt'; - die unless $c->stash->{user}->emailaddress; + error($c, "No email address is set for this user.") unless $c->stash->{user}->emailaddress; # Get all current builds of which this user is a maintainer. $c->stash->{builds} = [$c->model('DB::Builds')->search(