Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ export async function validateCreateConnectionPropertiesDs(
errors.push(Messages.TABLE_WITH_NAME_NOT_EXISTS(hiddenTable));
}
}
if (hidden_tables.includes(default_showing_table)) {
errors.push(Messages.CANT_SHOW_TABLE_AND_EXCLUDE(default_showing_table));
}
}

if (default_showing_table && !tablesInConnection.includes(default_showing_table)) {
Expand Down
2 changes: 2 additions & 0 deletions backend/src/exceptions/text/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export const Messages = {
'It seems like the value you entered for the unique field already exists in database. Please check your input and try again with a different value',
CANT_LIST_AND_EXCLUDE: (fieldName: string) =>
`You cannot select the same field ${fieldName ? fieldName : 'names'} to list and exclude`,
CANT_SHOW_TABLE_AND_EXCLUDE: (tableName: string) =>
`You cannot select the same table "${tableName}" to show by default and exclude`,
CANT_VIEW_AND_EXCLUDE: (fieldName: string) =>
`You cannot select the same field ${fieldName ? fieldName : 'names'} to view and exclude`,
CANT_ORDER_AND_EXCLUDE: `You cannot select the same field names to order and exclude`,
Expand Down
Loading