Bug 21907: Fix article requests count for non-superlibrarians

The query generates "Column 'branchcode' in where clause is ambiguous"

Test plan:
1 - Enable 'IndependentBranchesPatronModifications' and article requests
2 - Sign in as non-superlibrarian
3 - View plack log
4 - Refresh mainpage, see error in logs

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ab9e4ca6a4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2018-12-11 10:13:42 -03:00 committed by Martin Renvoize
parent f2151c1bbc
commit 9c82370126
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ my $pending_discharge_requests = Koha::Patron::Discharge::count({ pending => 1 }
my $pending_article_requests = Koha::ArticleRequests->search_limited(
{
status => Koha::ArticleRequest::Status::Pending,
$branch ? ( branchcode => $branch ) : (),
$branch ? ( 'me.branchcode' => $branch ) : (),
}
)->count;