From 4ad4574fe26748f2bf5658c2dd9ba3d896cd8077 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 13 Feb 2019 11:45:58 +0100 Subject: [PATCH] Ergebnis von SL::DB::Manager::Employee->current cachen --- SL/DB/Manager/Employee.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SL/DB/Manager/Employee.pm b/SL/DB/Manager/Employee.pm index a8c690ade..f9642ab7b 100644 --- a/SL/DB/Manager/Employee.pm +++ b/SL/DB/Manager/Employee.pm @@ -22,7 +22,7 @@ sub _sort_spec { sub current { return undef unless $::myconfig{login}; - return shift->find_by(login => $::myconfig{login}); + return $::request->cache('current')->{object} //= shift->find_by(login => $::myconfig{login}); } sub update_entries_for_authorized_users { -- 2.20.1