diff --git a/docs/en_US/release_notes_6_1.rst b/docs/en_US/release_notes_6_1.rst index 4d9b572b6..4ab3e99f2 100644 --- a/docs/en_US/release_notes_6_1.rst +++ b/docs/en_US/release_notes_6_1.rst @@ -41,4 +41,5 @@ Bug fixes | `Issue #6912 `_ - Fixed browser tree sort order regression issue. | `Issue #6915 `_ - Fixed an issue where the blank string is stored instead of NULL in the server table of SQLite database. | `Issue #6928 `_ - Ensure that the master password should be prompt when MASTER_PASSWORD_REQUIRED is set to True and AUTHENTICATION_SOURCES is webserver. +| `Issue #6929 `_ - Ensure that only the table node should be allowed to drop on the ERD tool. | `Issue #6930 `_ - Fixed an issue where the existing server group is disappeared on rename it. diff --git a/web/pgadmin/browser/static/js/browser.js b/web/pgadmin/browser/static/js/browser.js index e1e025f9b..40fc14a8a 100644 --- a/web/pgadmin/browser/static/js/browser.js +++ b/web/pgadmin/browser/static/js/browser.js @@ -68,6 +68,7 @@ define('pgadmin.browser', [ return { text: text, objUrl: generateNodeUrl.call(pgBrowser.Nodes[data._type], treeNodeInfo, 'properties', data, true), + nodeType: data._type, cur: { from: text.length, to: text.length, diff --git a/web/pgadmin/tools/erd/static/js/erd_tool/ui_components/BodyWidget.jsx b/web/pgadmin/tools/erd/static/js/erd_tool/ui_components/BodyWidget.jsx index 106ba4989..cb5f1e2be 100644 --- a/web/pgadmin/tools/erd/static/js/erd_tool/ui_components/BodyWidget.jsx +++ b/web/pgadmin/tools/erd/static/js/erd_tool/ui_components/BodyWidget.jsx @@ -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.'));