Skip to content

Commit

Permalink
circulation: fix patron history
Browse files Browse the repository at this point in the history
For the patrons's history we only retrieve the loan type.

* Closes rero/rero-ils#3529.

Co-Authored-by: Bertrand Zuchuat <[email protected]>
  • Loading branch information
Garfield-fr committed Dec 6, 2023
1 parent 59c36fa commit baba61d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/admin/src/app/api/operation-logs-api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class OperationLogsApiService extends BaseApi {
* @returns Observable
*/
getHistoryByLoanPid(loanPid: string, type: string = 'checkin'): Observable<Record | Error> {
const query = `_exists_:loan AND loan.pid:${loanPid} AND loan.trigger:${type}`;
const query = `_exists_:loan AND loan.pid:${loanPid} AND loan.trigger:${type} AND record.type:loan`;
return this._recordService.getRecords('operation_logs', query, 1, 1, undefined, undefined, BaseApi.reroJsonheaders)
.pipe(map((result: any) => {
return this._recordService.totalHits(result.hits.total) === 1
Expand Down

0 comments on commit baba61d

Please sign in to comment.