Fixes #1285 - Update the comments (description) over the tablespace

properly.
This commit is contained in:
Murtuza Zabuawala 2016-06-03 15:36:40 +05:30 committed by Ashesh Vashi
parent 9436542074
commit 8b54b59f2b
4 changed files with 5 additions and 5 deletions

View File

@ -412,7 +412,7 @@ class TablespaceView(PGChildNodeView):
if SQL and SQL.strip('\n') and SQL.strip(' '):
return make_json_response(
data=SQL,
data=SQL.strip('\n'),
status=200
)
@ -518,7 +518,7 @@ class TablespaceView(PGChildNodeView):
SQL = sql_header + SQL
return ajax_response(response=SQL)
return ajax_response(response=SQL.strip('\n'))
@check_precondition

View File

@ -15,7 +15,7 @@ ALTER TABLESPACE {{ conn|qtIdent(data.name) }}
{% endif %}
{# ==== To update tablespace comments ==== #}
{% if data.description and data.description != o_data.description %}
{% if data.description is defined and data.description != o_data.description %}
COMMENT ON TABLESPACE {{ conn|qtIdent(data.name) }}
IS {{ data.description|qtLiteral }};

View File

@ -16,7 +16,7 @@ ALTER TABLESPACE {{ conn|qtIdent(data.name) }}
{% endif %}
{# ==== To update tablespace comments ==== #}
{% if data.description and data.description != o_data.description %}
{% if data.description is defined and data.description != o_data.description %}
COMMENT ON TABLESPACE {{ conn|qtIdent(data.name) }}
IS {{ data.description|qtLiteral }};

View File

@ -15,7 +15,7 @@ ALTER TABLESPACE {{ conn|qtIdent(data.name) }}
{% endif %}
{# ==== To update tablespace comments ==== #}
{% if data.description and data.description != o_data.description %}
{% if data.description is defined and data.description != o_data.description %}
COMMENT ON TABLESPACE {{ conn|qtIdent(data.name) }}
IS {{ data.description|qtLiteral }};