mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-25 18:20:20 -06:00
Remove redundant empty option for Exclusion constraint access method name, Of type, and Like relations. Fixes #6825
This commit is contained in:
parent
82935ad3be
commit
28892bb07f
@ -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']),
|
||||
|
@ -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)
|
||||
|
@ -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: []
|
||||
};
|
||||
});
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user