Fixed an issue where comments on domain constraints were not visible when selecting a domain node. Fixes #7403

This commit is contained in:
Akshay Joshi 2022-05-24 14:50:33 +05:30
parent befd4b1fa8
commit efe613d13e
3 changed files with 9 additions and 2 deletions

View File

@ -30,3 +30,4 @@ Bug fixes
| `Issue #7388 <https://redmine.postgresql.org/issues/7388>`_ - Fixed an issue where an error message fills the entire window if the query is long.
| `Issue #7393 <https://redmine.postgresql.org/issues/7393>`_ - Ensure that the editor position should not get changed once it is opened.
| `Issue #7402 <https://redmine.postgresql.org/issues/7402>`_ - Ensure that Dashboard graphs should be refreshed on changing the node from the browser tree.
| `Issue #7403 <https://redmine.postgresql.org/issues/7403>`_ - Fixed an issue where comments on domain constraints were not visible when selecting a domain node.

View File

@ -17,6 +17,11 @@ ALTER DOMAIN {{ conn|qtIdent(data.basensp, data.name) }} OWNER TO {{ conn|qtIden
ALTER DOMAIN {{ conn|qtIdent(data.basensp, data.name) }}
ADD CONSTRAINT {{ conn|qtIdent(c.conname) }} CHECK ({{ c.consrc }}){% if not c.convalidated %} NOT VALID{% endif %}{% endif -%};
{% if c.description %}
COMMENT ON CONSTRAINT {{ conn|qtIdent(c.conname) }} ON DOMAIN {{ conn|qtIdent(data.basensp, data.name) }}
IS '{{ c.description }}';
{% endif %}
{% endfor -%}
{% endif %}

View File

@ -85,8 +85,9 @@ class SchemaDiffObjectCompare:
target = self.fetch_objects_to_compare(**target_params)
# If both the dict have no items then return None.
if not (source or target) or (
len(source) <= 0 and len(target) <= 0):
if not (source or target) or not \
(isinstance(source, dict) and isinstance(target, dict)) or \
(len(source) <= 0 and len(target) <= 0):
return None
return compare_dictionaries(view_object=self,