mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure that only the table node should be allowed to drop on the ERD tool. Fixes #6929
This commit is contained in:
committed by
Akshay Joshi
parent
9e3165c0ff
commit
9de1489322
@@ -371,7 +371,7 @@ export default class BodyWidget extends React.Component {
|
||||
|
||||
onDropNode(e) {
|
||||
let nodeDropData = JSON.parse(e.dataTransfer.getData('text'));
|
||||
if(nodeDropData.objUrl) {
|
||||
if(nodeDropData.objUrl && nodeDropData.nodeType === 'table') {
|
||||
let matchUrl = `/${this.props.params.sgid}/${this.props.params.sid}/${this.props.params.did}/`;
|
||||
if(nodeDropData.objUrl.indexOf(matchUrl) == -1) {
|
||||
this.props.alertify.error(gettext('Cannot drop table from outside of the current database.'));
|
||||
|
||||
Reference in New Issue
Block a user