From 01c863f6dcdf3dd0ccf659cbd122b750f0b60565 Mon Sep 17 00:00:00 2001 From: Lari Taskula Date: Mon, 10 Jul 2017 16:58:31 +0300 Subject: [PATCH] Bug 16306 - (squashable) C4::Context->setCommandlineEnvironment() convenience function Test t/db_dependent/Context_commandline.t fails due to commandlinesuperuser not being stored in the database. To test: 1. Make sure commandlinesuperuser does not exist 2. prove t/db_dependent/Context_commandline.t 3. Observe failure 4. Apply patch 5. prove t/db_dependent/Context_commandline.t 6. Success --- C4/Context.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Context.pm b/C4/Context.pm index 1e9a1eb..c76ee59 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -1035,7 +1035,7 @@ sub _enforceCommandlineSuperuserBorrowerExists { dateexpiry => '2099-12-31', categorycode => $ctgr || 'NOCAT', branchcode => $brnchcd, - }); + })->store; $commandlineSuperuser = Koha::Patrons->find({userid => 'commandlineadmin'}); } return $commandlineSuperuser; -- 2.7.4