From cb3001ac3b4a8cbffeabd045dced0435589b2f57 Mon Sep 17 00:00:00 2001 From: jonaswinkler Date: Mon, 4 Jan 2021 17:31:35 +0100 Subject: [PATCH] bugfix --- src-ui/src/app/services/document-list-view.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src-ui/src/app/services/document-list-view.service.ts b/src-ui/src/app/services/document-list-view.service.ts index a9b7d5419..1bbcca38e 100644 --- a/src-ui/src/app/services/document-list-view.service.ts +++ b/src-ui/src/app/services/document-list-view.service.ts @@ -111,7 +111,8 @@ export class DocumentListViewService { this.isReloading = false }, error => { - if (error.error['detail'] == 'Invalid page.') { + if (this.currentPage != 1 && error.status == 404) { + // this happens when applying a filter: the current page might not be available anymore due to the reduced result set. this.currentPage = 1 this.reload() }