Skip to content

Commit

Permalink
persons: fix filter to get documents in organisation views
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
benerken committed Oct 30, 2019
1 parent 0c3a26c commit dbaca37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rero_ils/modules/mef_persons/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down

0 comments on commit dbaca37

Please sign in to comment.