mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-14 00:26:21 +00:00
Fix: reset documents sort field if user deletes the custom field (#9127)
This commit is contained in:
@@ -306,6 +306,14 @@ export class DocumentListViewService {
|
||||
// this happens when applying a filter: the current page might not be available anymore due to the reduced result set.
|
||||
activeListViewState.currentPage = 1
|
||||
this.reload()
|
||||
} else if (
|
||||
activeListViewState.sortField.indexOf('custom_field') === 0 &&
|
||||
this.settings.allDisplayFields.find(
|
||||
(f) => f.id === activeListViewState.sortField
|
||||
) === undefined
|
||||
) {
|
||||
// e.g. field was deleted
|
||||
this.sortField = 'created'
|
||||
} else {
|
||||
this.selectionData = null
|
||||
let errorMessage
|
||||
|
Reference in New Issue
Block a user