[REFACTOR] remove isRemote assertion from hasFieldPosition util (#10519)
Following this discussion https://github.com/twentyhq/twenty/pull/10510#discussion_r1971845556 with @ijreilly
This commit is contained in:
@ -4,7 +4,6 @@ import { FieldMetadataType } from 'twenty-shared';
|
||||
export const hasObjectMetadataItemPositionField = (
|
||||
objectMetadataItem: ObjectMetadataItem,
|
||||
) =>
|
||||
!objectMetadataItem.isRemote &&
|
||||
objectMetadataItem.fields.some(
|
||||
(field) => field.type === FieldMetadataType.POSITION,
|
||||
);
|
||||
|
||||
@ -35,7 +35,10 @@ export const turnSortsIntoOrderBy = (
|
||||
})
|
||||
.filter(isDefined);
|
||||
|
||||
if (hasObjectMetadataItemPositionField(objectMetadataItem)) {
|
||||
if (
|
||||
!objectMetadataItem.isRemote &&
|
||||
hasObjectMetadataItemPositionField(objectMetadataItem)
|
||||
) {
|
||||
const positionOrderBy = [
|
||||
{
|
||||
position: 'AscNullsFirst',
|
||||
|
||||
Reference in New Issue
Block a user