From dbaca37d014865916f864759b1f436b014273da9 Mon Sep 17 00:00:00 2001 From: Benoit Erken Date: Wed, 30 Oct 2019 09:07:15 +0100 Subject: [PATCH] persons: fix filter to get documents in organisation views * Uses correct filter (holdings in place of items) to display documents list in person detailed views filtered by organisation views. * Closes #553 Co-Authored-by: Benoit Erken erken.benoit@gmail.com --- rero_ils/modules/mef_persons/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rero_ils/modules/mef_persons/views.py b/rero_ils/modules/mef_persons/views.py index a2e2138a49..6e8d73493c 100644 --- a/rero_ils/modules/mef_persons/views.py +++ b/rero_ils/modules/mef_persons/views.py @@ -75,7 +75,7 @@ def persons_detailed_view(viewcode, pid): )): org_pid = Organisation.get_record_by_viewcode(viewcode)['pid'] search = search.filter( - 'term', items__organisation__organisation_pid=org_pid + 'term', holdings__organisation__organisation_pid=org_pid ) for result in search.execute().hits.hits: record.setdefault('documents', []).append(result.get('_source'))