Fix: reset documents sort field if user deletes the custom field (#9127)

This commit is contained in:
shamoon
2025-02-16 07:24:17 -08:00
committed by GitHub
parent 17bb3ebbf5
commit 4718df271f
4 changed files with 18 additions and 6 deletions

View File

@@ -195,11 +195,7 @@ describe('DocumentListViewService', () => {
{ custom_field_999: ['Custom field not found'] },
{ status: 400, statusText: 'Unexpected error' }
)
expect(documentListViewService.error).toEqual(
'custom_field_999: Custom field not found'
)
// reset the list
documentListViewService.sortField = 'created'
// resets itself
req = httpTestingController.expectOne(
`${environment.apiBaseUrl}documents/?page=1&page_size=50&ordering=-created&truncate_content=true`
)