Fixed an issue where Grant wizard unable to handle multiple objects when the query string parameter exceeds its limit. Fixes #4511

This commit is contained in:
Aditya Toshniwal
2020-01-20 17:53:21 +05:30
committed by Akshay Joshi
parent b4b54d6b94
commit fde8e4054a
5 changed files with 15 additions and 19 deletions
+2 -8
View File
@@ -336,7 +336,7 @@ def properties(sid, did, node_id, node_type):
@blueprint.route(
'/sql/<int:sid>/<int:did>/',
methods=['GET'], endpoint='modified_sql'
methods=['POST'], endpoint='modified_sql'
)
@login_required
@check_precondition
@@ -346,13 +346,7 @@ def msql(sid, did):
"""
server_prop = server_info
data = {}
for k, v in request.args.items():
try:
data[k] = json.loads(v)
except ValueError:
data[k] = v
data = request.form if request.form else json.loads(request.data.decode())
# Form db connection
manager = get_driver(PG_DEFAULT_DRIVER).connection_manager(sid)
conn = manager.connection(did=did)
@@ -1012,9 +1012,9 @@ define([
// Fetches modified SQL
$.ajax({
url: this.msql_url,
type: 'GET',
type: 'POST',
cache: false,
data: self.model.toJSON(true, 'GET'),
data: JSON.stringify(self.model.toJSON(true)),
dataType: 'json',
contentType: 'application/json',
}).done(function(res) {