From f620fd3c1849007c055f39c4abba4ebf1ebdf133 Mon Sep 17 00:00:00 2001 From: Mohammed Abdul Razak Wahab <60781022+mdrazak2001@users.noreply.github.com> Date: Wed, 18 Dec 2024 23:14:00 +0530 Subject: [PATCH] Fixes person navigation after image upload (#9076) Fixes #8949 --- .../record-show/hooks/useRecordShowPagePagination.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/twenty-front/src/modules/object-record/record-show/hooks/useRecordShowPagePagination.ts b/packages/twenty-front/src/modules/object-record/record-show/hooks/useRecordShowPagePagination.ts index f1c68677b1fb..e6e963b8579e 100644 --- a/packages/twenty-front/src/modules/object-record/record-show/hooks/useRecordShowPagePagination.ts +++ b/packages/twenty-front/src/modules/object-record/record-show/hooks/useRecordShowPagePagination.ts @@ -62,7 +62,10 @@ export const useRecordShowPagePagination = ( useFindManyRecords({ skip: loadingCursor, fetchPolicy: 'network-only', - filter, + filter: { + ...filter, + id: { neq: objectRecordId }, + }, orderBy, cursorFilter: isNonEmptyString(cursorFromRequest) ? { @@ -81,7 +84,10 @@ export const useRecordShowPagePagination = ( const { loading: loadingRecordAfter, records: recordsAfter } = useFindManyRecords({ skip: loadingCursor, - filter, + filter: { + ...filter, + id: { neq: objectRecordId }, + }, fetchPolicy: 'network-only', orderBy, cursorFilter: cursorFromRequest