Remove redundant empty option for Exclusion constraint access method name, Of type, and Like relations. Fixes #6825

This commit is contained in:
Aditya Toshniwal 2021-09-29 15:23:48 +05:30 committed by Akshay Joshi
parent 82935ad3be
commit 28892bb07f
3 changed files with 5 additions and 12 deletions

View File

@ -616,7 +616,7 @@ class TableView(BaseTableView, DataTypeReader, SchemaDiffTableCompare):
if not status:
return internal_server_error(errormsg=res)
op_class_list = [{'label': '', 'value': ''}]
op_class_list = []
for r in result['rows']:
op_class_list.append({'label': r['opcname'],
@ -710,7 +710,7 @@ class TableView(BaseTableView, DataTypeReader, SchemaDiffTableCompare):
This function will return list of types available for table node
for node-ajax-control
"""
res = [{'label': '', 'value': ''}]
res = []
try:
SQL = render_template(
"/".join([self.table_template_path, 'get_oftype.sql']),
@ -821,7 +821,7 @@ class TableView(BaseTableView, DataTypeReader, SchemaDiffTableCompare):
This function will return list of tables available for
like/relation combobox while creating new table
"""
res = [{'label': '', 'value': ''}]
res = []
try:
SQL = render_template(
"/".join([self.table_template_path, 'get_relations.sql']),

View File

@ -250,7 +250,7 @@ def get_access_methods(conn, template_path=None):
:param template_path:
:return:
"""
res = [{'label': '', 'value': ''}]
res = []
sql = render_template("/".join([template_path, 'get_access_methods.sql']))
status, rest = conn.execute_2darray(sql)

View File

@ -632,14 +632,6 @@ export default class TableSchema extends BaseUISchema {
}, options: this.fieldOptions.typname, optionsLoaded: (res)=>{
obj.ofTypeTables = res;
},
depChange: (state, source)=>{
if(source[0] == 'typname' && !isEmptyString(state.typname)) {
return {
columns: [],
primary_key: []
};
}
},
deferredDepChange: (state, source, topState, actionObj)=>{
const setColumns = (resolve)=>{
let finalCols = [];
@ -651,6 +643,7 @@ export default class TableSchema extends BaseUISchema {
obj.changeColumnOptions(finalCols);
return {
columns: finalCols,
primary_key: []
};
});
};