Fix object metadata view creation issue (#9875)

Fixes https://github.com/twentyhq/core-team-issues/issues/26
Fixes https://github.com/twentyhq/twenty/issues/9350
This commit is contained in:
Charles Bochet
2025-01-27 21:25:02 +01:00
committed by GitHub
parent 549c3faf71
commit 4542199e5c
10 changed files with 48 additions and 73 deletions

View File

@ -72,10 +72,14 @@ export const useFindManyRecords = <T extends ObjectRecord = ObjectRecord>({
useQuery<RecordGqlOperationFindManyResult>(findManyRecordsQuery, {
skip: skip || !objectMetadataItem,
variables: {
filter: {
...filter,
...(withSoftDeleted ? withSoftDeleterFilter : {}),
},
...(filter || withSoftDeleted
? {
filter: {
...filter,
...(withSoftDeleted ? withSoftDeleterFilter : {}),
},
}
: {}),
orderBy,
lastCursor: cursorFilter?.cursor ?? undefined,
limit: cursorFilter?.limit ?? limit,