Browse Source

fix: skip validation and hooks when updating column options - update all occurrence

pull/7070/head
Pranav C 1 year ago
parent
commit
eecd035994
  1. 10
      packages/nocodb/src/services/columns.service.ts

10
packages/nocodb/src/services/columns.service.ts

@ -731,7 +731,10 @@ export class ColumnsService {
]); ]);
} else { } else {
await baseModel.bulkUpdateAll( await baseModel.bulkUpdateAll(
{ where: `(${column.title},eq,${option.title})` }, {
where: `(${column.title},eq,${option.title})`,
skipValidationAndHooks: true,
},
{ [column.column_name]: newOp.title }, { [column.column_name]: newOp.title },
{ cookie }, { cookie },
); );
@ -817,7 +820,10 @@ export class ColumnsService {
]); ]);
} else { } else {
await baseModel.bulkUpdateAll( await baseModel.bulkUpdateAll(
{ where: `(${column.title},eq,${ch.temp_title})` }, {
where: `(${column.title},eq,${ch.temp_title})`,
skipValidationAndHooks: true,
},
{ [column.column_name]: newOp.title }, { [column.column_name]: newOp.title },
{ cookie }, { cookie },
); );

Loading…
Cancel
Save