mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix UUID datatype typecast issue.
This commit is contained in:
parent
636ab5cbab
commit
7ce03f3bea
@ -106,9 +106,9 @@ ALL_JSON_TYPES = PSYCOPG_SUPPORTED_JSON_TYPES +\
|
||||
# OID reference psycopg/lib/_ipaddress.py
|
||||
PSYCOPG_SUPPORTED_IPADDRESS_ARRAY_TYPES = (1041, 651)
|
||||
|
||||
# uuid[]
|
||||
# uuid[], uuid
|
||||
# OID reference psycopg/lib/extras.py
|
||||
PSYCOPG_SUPPORTED_IPADDRESS_ARRAY_TYPES = (2951,)
|
||||
PSYCOPG_SUPPORTED_IPADDRESS_ARRAY_TYPES = (2951, 2950)
|
||||
|
||||
# int4range, int8range, numrange, daterange tsrange, tstzrange[]
|
||||
# OID reference psycopg/lib/_range.py
|
||||
@ -132,15 +132,8 @@ def register_global_typecasters():
|
||||
psycopg.adapters.register_loader(typ,
|
||||
TextLoaderpgAdmin)
|
||||
|
||||
#
|
||||
# # define type caster to convert pg array types of above types into
|
||||
# # array of string type
|
||||
# pg_array_types_to_array_of_string_type = \
|
||||
# psycopg.extensions.new_array_type(
|
||||
# TO_ARRAY_OF_STRING_DATATYPES,
|
||||
# 'TYPECAST_TO_ARRAY_OF_STRING', pg_types_to_string_type
|
||||
# )
|
||||
|
||||
# Define type caster to convert pg array types of above types into
|
||||
# array of string type
|
||||
for typ in TO_ARRAY_OF_STRING_DATATYPES:
|
||||
psycopg.adapters.register_loader(typ, TextLoaderpgAdmin)
|
||||
|
||||
|
@ -62,18 +62,15 @@ class BaseFeatureTest(BaseTestGenerator):
|
||||
pass
|
||||
|
||||
def tearDown(self):
|
||||
python2_failures = hasattr(
|
||||
self, "_resultForDoCleanups") and self.current_test_failed()
|
||||
|
||||
python3_failures = hasattr(self, '_outcome') and self.any_step_failed()
|
||||
|
||||
if python2_failures or python3_failures:
|
||||
if python3_failures:
|
||||
self._screenshot()
|
||||
|
||||
self.after()
|
||||
|
||||
def any_step_failed(self):
|
||||
for step in self._outcome.errors:
|
||||
for step in self._outcome.result.errors:
|
||||
if step[1] is not None:
|
||||
return True
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user