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,
isCustom: true,
nameSingular: 'position',
name: 'position',
},
{
type: FieldMetadataType.NUMBER,
isCustom: true,
nameSingular: 'testNumber',
name: 'testNumber',
},
{
type: FieldMetadataType.TEXT,
isCustom: true,
nameSingular: 'otherField',
name: 'otherField',
},
],
fieldsByName: {
position: {
type: FieldMetadataType.POSITION,
isCustom: true,
nameSingular: 'position',
name: 'position',
},
testNumber: {
type: FieldMetadataType.NUMBER,
isCustom: true,
nameSingular: 'testNumber',
name: 'testNumber',
},
otherField: {
type: FieldMetadataType.TEXT,
isCustom: true,
nameSingular: 'otherField',
name: 'otherField',
},
} as unknown as FieldMetadataMap,
},

View File

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