Merge pull request #747 from datastax/python-742
PYTHON-742: Ensure UDT are validated
This commit is contained in:
commit
91e389f2c6
@ -973,6 +973,13 @@ class UserDefinedType(Column):
|
|||||||
field_names=[c.db_field_name for c in self.user_type._fields.values()],
|
field_names=[c.db_field_name for c in self.user_type._fields.values()],
|
||||||
field_types=[c.cql_type for c in self.user_type._fields.values()])
|
field_types=[c.cql_type for c in self.user_type._fields.values()])
|
||||||
|
|
||||||
|
def validate(self, value):
|
||||||
|
val = super(UserDefinedType, self).validate(value)
|
||||||
|
if val is None:
|
||||||
|
return
|
||||||
|
val.validate()
|
||||||
|
return val
|
||||||
|
|
||||||
|
|
||||||
def resolve_udts(col_def, out_list):
|
def resolve_udts(col_def, out_list):
|
||||||
for col in col_def.sub_types:
|
for col in col_def.sub_types:
|
||||||
|
Loading…
Reference in New Issue
Block a user