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 6e2e2fc82e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -314,7 +314,7 @@
const relatedTable = $tables.list.find( const relatedTable = $tables.list.find(
tbl => tbl._id === fieldInfo.tableId 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}` newError.relatedName = `Column name already in use in table ${relatedTable.name}`
} }
} }