Skip to content

Commit

Permalink
[hotfix] SQL endpoint JQUERY error
Browse files Browse the repository at this point in the history
Fixes #935
  • Loading branch information
mistercrunch committed Aug 17, 2016
1 parent 8097495 commit ac512ef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions caravel/assets/javascripts/sql.js
@@ -1,4 +1,5 @@
const $ = window.$ = require('jquery');
const jQuery = window.jQuery = require('jquery'); // eslint-disable-line
const showModal = require('./modules/utils.js').showModal;
require('./caravel-select2.js');
require('datatables.net-bs');
Expand All @@ -17,7 +18,7 @@ $(document).ready(function () {
return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
}
function initSqlEditorView() {
const databaseId = $('#databaseId').val();
const databaseId = $('#database_id').val();
const editor = ace.edit('sql');
editor.$blockScrolling = Infinity;
editor.getSession().setUseWrapMode(true);
Expand Down Expand Up @@ -67,7 +68,7 @@ $(document).ready(function () {
url: '/caravel/runsql/',
data: {
data: JSON.stringify({
databaseId: $('#databaseId').val(),
database_id: $('#database_id').val(),
sql: editor.getSession().getValue(),
}),
},
Expand Down

0 comments on commit ac512ef

Please sign in to comment.