mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix unwanted space indentation issue in Database node.
This commit is contained in:
parent
47007076cc
commit
d7f5e95b2b
@ -10,6 +10,7 @@
|
|||||||
"""Implements the Database Node"""
|
"""Implements the Database Node"""
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
import re
|
||||||
from flask import render_template, make_response, current_app, request, jsonify
|
from flask import render_template, make_response, current_app, request, jsonify
|
||||||
from flask.ext.babel import gettext as _
|
from flask.ext.babel import gettext as _
|
||||||
from pgadmin.utils.ajax import make_json_response, \
|
from pgadmin.utils.ajax import make_json_response, \
|
||||||
@ -635,6 +636,7 @@ class DatabaseView(PGChildNodeView):
|
|||||||
if not status:
|
if not status:
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
res = re.sub('\n{2,}', '\n\n', res)
|
||||||
SQL = res.strip('\n').strip(' ')
|
SQL = res.strip('\n').strip(' ')
|
||||||
|
|
||||||
return make_json_response(
|
return make_json_response(
|
||||||
@ -854,7 +856,8 @@ class DatabaseView(PGChildNodeView):
|
|||||||
result.update(frmtd_variables)
|
result.update(frmtd_variables)
|
||||||
|
|
||||||
SQL = self.get_new_sql(gid, sid, result, did)
|
SQL = self.get_new_sql(gid, sid, result, did)
|
||||||
|
SQL = re.sub('\n{2,}', '\n\n', SQL)
|
||||||
|
SQL = SQL.strip('\n')
|
||||||
return ajax_response(response=SQL)
|
return ajax_response(response=SQL)
|
||||||
|
|
||||||
@check_precondition()
|
@check_precondition()
|
||||||
|
Loading…
Reference in New Issue
Block a user