mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 19:11:13 +00:00
fix(Google Sheets Node): Do not insert row_number as a new column, do not checkForSchemaChanges in update operation (#10201)
This commit is contained in:
@@ -343,11 +343,16 @@ export function checkForSchemaChanges(
|
||||
) {
|
||||
const updatedColumnNames: Array<{ oldName: string; newName: string }> = [];
|
||||
|
||||
//if sheet does not contain ROW_NUMBER ignore it as data come from read rows operation
|
||||
const schemaColumns = columnNames.includes(ROW_NUMBER)
|
||||
? schema.map((s) => s.id)
|
||||
: schema.filter((s) => s.id !== ROW_NUMBER).map((s) => s.id);
|
||||
|
||||
for (const [columnIndex, columnName] of columnNames.entries()) {
|
||||
const schemaEntry = schema[columnIndex];
|
||||
const schemaEntry = schemaColumns[columnIndex];
|
||||
if (schemaEntry === undefined) break;
|
||||
if (columnName !== schema[columnIndex].id) {
|
||||
updatedColumnNames.push({ oldName: schema[columnIndex].id, newName: columnName });
|
||||
if (columnName !== schemaEntry) {
|
||||
updatedColumnNames.push({ oldName: schemaEntry, newName: columnName });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user