Fixed Cast node related issues. Fixes #6741

This commit is contained in:
Pradip Parkale 2021-09-23 19:19:34 +05:30 committed by Akshay Joshi
parent 8125320093
commit 6d08d9aa9f
3 changed files with 5 additions and 6 deletions

View File

@ -347,7 +347,7 @@ class CastView(PGChildNodeView, SchemaDiffObjectCompare):
:param cid:
:return:
"""
last_system_oid = 0 if self.blueprint.show_system_objects else \
last_system_oid = 0 if not self.blueprint.show_system_objects else \
self.datlastsysoid
sql = render_template(
"/".join([self.template_path, self._PROPERTIES_SQL]),

View File

@ -10,7 +10,6 @@ import { getNodeAjaxOptions } from '../../../../../../static/js/node_ajax';
import CastSchema from './cast.ui';
import getApiInstance from '../../../../../../../static/js/api_instance';
define('pgadmin.node.cast', [
'sources/gettext', 'sources/url_for', 'jquery', 'underscore',
'sources/pgadmin', 'pgadmin.browser',
@ -114,6 +113,9 @@ define('pgadmin.node.cast', [
.catch((err)=>{
reject(err);
});
}else{
let data = [];
resolve(data);
}
});
},

View File

@ -9,9 +9,6 @@
import gettext from 'sources/gettext';
import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import { isEmptyString } from 'sources/validators';
export default class CastSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) {
super({
@ -20,7 +17,7 @@ export default class CastSchema extends BaseUISchema {
srctyp: undefined, // Source type
trgtyp: undefined, // Target type
proname: undefined, // Function
castcontext: true, // Context (IMPLICIT/EXPLICIT/ASSIGNMENT)
castcontext: false, // Context (IMPLICIT/EXPLICIT/ASSIGNMENT)
syscast: undefined, // Is this cast is system object? Yes/No
description: undefined, // Comment on the cast
...initValues,