Cover more scenarios for the pgAdmin freezing issue. Fixes #5427

This commit is contained in:
Pradip Parkale 2021-11-10 11:11:24 +05:30 committed by Akshay Joshi
parent 1ed4d0f95e
commit eb8168285e

View File

@ -29,6 +29,7 @@ from pgadmin.browser.server_groups.servers.databases.schemas.tables.\
columns import utils as column_utils
from pgadmin.browser.server_groups.servers.databases.schemas.tables.\
constraints.exclusion_constraint import utils as exclusion_utils
from pgadmin.utils.exception import ExecuteError
class TableModule(SchemaChildModule):
@ -1024,6 +1025,11 @@ class TableView(BaseTableView, DataTypeReader, SchemaDiffTableCompare):
if not status:
return res
lock_on_table = self.get_table_locks(did, res['rows'][0])
if lock_on_table != '':
return ExecuteError(
error_msg=str(lock_on_table.json['info']))
return super(TableView, self).update(
gid, sid, did, scid, tid, data=data, res=res)
except Exception as e: