Fixed 'Location cannot be empty' error when open Tablespace properties. Fixes #4134

This commit is contained in:
Aditya Toshniwal
2019-04-18 12:31:35 +05:30
committed by Akshay Joshi
parent 0b47d1dbf6
commit d96f453e7f
3 changed files with 5 additions and 5 deletions

View File

@@ -21,6 +21,7 @@ Bug fixes
| `Bug #3938 <https://redmine.postgresql.org/issues/3938>`_ - Added support for Default Partition.
| `Bug #4104 <https://redmine.postgresql.org/issues/4104>`_ - Ensure that record should be add/edited for root partition table with primary keys.
| `Bug #4121 <https://redmine.postgresql.org/issues/4121>`_ - Fixed alignment issue of columns in definition section of Index node.
| `Bug #4134 <https://redmine.postgresql.org/issues/4134>`_ - Fixed 'Location cannot be empty' error when open Tablespace properties.
| `Bug #4138 <https://redmine.postgresql.org/issues/4138>`_ - Fix an issue where the dropdown becomes misaligned/displaced.
| `Bug #4161 <https://redmine.postgresql.org/issues/4161>`_ - Ensure that parameters of procedures for EPAS server 10 and below should be set/reset properly.
| `Bug #4182 <https://redmine.postgresql.org/issues/4182>`_ - Ensure sanity of the permissions on the storage and session directories and the config database.

View File

@@ -389,8 +389,9 @@ define('pgadmin.node.tablespace', [
|| String(this.get('name')).replace(/^\s+|\s+$/g, '') == '') {
msg = gettext('Name cannot be empty.');
this.errorModel.set('name', msg);
} else if (_.isUndefined(this.get('spclocation'))
|| String(this.get('spclocation')).replace(/^\s+|\s+$/g, '') == '') {
} else if (this.isNew() &&
(_.isUndefined(this.get('spclocation'))
|| String(this.get('spclocation')).replace(/^\s+|\s+$/g, '') == '')) {
msg = gettext('Location cannot be empty.');
this.errorModel.set('spclocation', msg);
this.errorModel.unset('name');

View File

@@ -16,13 +16,11 @@ ALTER {% if role %}ROLE {{ self.conn|qtIdent(role) }}{% if database %} IN DATABA
{################################################}
{% macro SET(conn, object_type, object_name, options) -%}
ALTER {{object_type}} {{ conn|qtIdent(object_name) }}
SET ({% for opt in options %}{% if loop.index != 1 %}
, {% endif %}{{ conn|qtIdent(opt.name) }}={{ opt.value }}{% endfor %});
{%- endmacro %}
{% macro UNSET(conn, object_type, object_name, options) -%}
ALTER {{object_type}} {{ conn|qtIdent(object_name) }}
RESET ({% for opt in options %}{% if loop.index != 1 %}
, {% endif %}{{ conn|qtIdent(opt.name) }}{% endfor %});
{%- endmacro %}