quick fix for positionInViewFilterGroup (#9223)

fix 9206

In the future, we should have a look at the column naming
"positionInViewFilterGroup"
because it breaks the SQL queries in `record-position-query.factory.ts`
for viewFilter tablenames
This commit is contained in:
Guillim
2024-12-24 11:49:50 +01:00
committed by GitHub
parent b52c23bb66
commit 801bf7c016
2 changed files with 9 additions and 7 deletions

View File

@ -22,34 +22,34 @@ describe('QueryRunnerArgsFactory', () => {
{ {
type: FieldMetadataType.POSITION, type: FieldMetadataType.POSITION,
isCustom: true, isCustom: true,
nameSingular: 'position', name: 'position',
}, },
{ {
type: FieldMetadataType.NUMBER, type: FieldMetadataType.NUMBER,
isCustom: true, isCustom: true,
nameSingular: 'testNumber', name: 'testNumber',
}, },
{ {
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
isCustom: true, isCustom: true,
nameSingular: 'otherField', name: 'otherField',
}, },
], ],
fieldsByName: { fieldsByName: {
position: { position: {
type: FieldMetadataType.POSITION, type: FieldMetadataType.POSITION,
isCustom: true, isCustom: true,
nameSingular: 'position', name: 'position',
}, },
testNumber: { testNumber: {
type: FieldMetadataType.NUMBER, type: FieldMetadataType.NUMBER,
isCustom: true, isCustom: true,
nameSingular: 'testNumber', name: 'testNumber',
}, },
otherField: { otherField: {
type: FieldMetadataType.TEXT, type: FieldMetadataType.TEXT,
isCustom: true, isCustom: true,
nameSingular: 'otherField', name: 'otherField',
}, },
} as unknown as FieldMetadataMap, } as unknown as FieldMetadataMap,
}, },

View File

@ -40,7 +40,9 @@ export class QueryRunnerArgsFactory {
const shouldBackfillPosition = const shouldBackfillPosition =
options.objectMetadataItemWithFieldMaps.fields.some( options.objectMetadataItemWithFieldMaps.fields.some(
(field) => field.type === FieldMetadataType.POSITION, (field) =>
field.type === FieldMetadataType.POSITION &&
field.name === 'position',
); );
switch (resolverArgsType) { switch (resolverArgsType) {