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

@@ -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 %}
{%- endmacro %}