mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
[TABLES] Do not assign the paramter values, use separate variable for new value
This commit is contained in:
@@ -969,14 +969,14 @@ class TableView(BaseTableView, DataTypeReader, VacuumSettings,
|
|||||||
tname=data['name']
|
tname=data['name']
|
||||||
)
|
)
|
||||||
|
|
||||||
status, scid = self.conn.execute_scalar(SQL)
|
status, new_scid = self.conn.execute_scalar(SQL)
|
||||||
if not status:
|
if not status:
|
||||||
return internal_server_error(errormsg=scid)
|
return internal_server_error(errormsg=new_scid)
|
||||||
|
|
||||||
# we need oid to to add object in tree at browser
|
# we need oid to to add object in tree at browser
|
||||||
SQL = render_template(
|
SQL = render_template(
|
||||||
"/".join([self.table_template_path, 'get_oid.sql']),
|
"/".join([self.table_template_path, 'get_oid.sql']),
|
||||||
scid=scid, data=data
|
scid=new_scid, data=data
|
||||||
)
|
)
|
||||||
|
|
||||||
status, tid = self.conn.execute_scalar(SQL)
|
status, tid = self.conn.execute_scalar(SQL)
|
||||||
@@ -986,7 +986,7 @@ class TableView(BaseTableView, DataTypeReader, VacuumSettings,
|
|||||||
return jsonify(
|
return jsonify(
|
||||||
node=self.blueprint.generate_browser_node(
|
node=self.blueprint.generate_browser_node(
|
||||||
tid,
|
tid,
|
||||||
scid,
|
new_scid,
|
||||||
data['name'],
|
data['name'],
|
||||||
icon=self.get_icon_css_class(data),
|
icon=self.get_icon_css_class(data),
|
||||||
is_partitioned=self.is_table_partitioned(data)
|
is_partitioned=self.is_table_partitioned(data)
|
||||||
|
|||||||
Reference in New Issue
Block a user