Merge pull request #7873 from Budibase/bug/column-name-other-table-validation

Don't show validation error for existing relationship
This commit is contained in:
Michael Drury 2022-10-04 12:49:47 +01:00 committed by GitHub
commit 89436d3d13
1 changed files with 1 additions and 1 deletions

View File

@ -314,7 +314,7 @@
const relatedTable = $tables.list.find(
tbl => tbl._id === fieldInfo.tableId
)
if (inUse(relatedTable, fieldInfo.fieldName)) {
if (inUse(relatedTable, fieldInfo.fieldName) && !originalName) {
newError.relatedName = `Column name already in use in table ${relatedTable.name}`
}
}