Skip to content

Commit 315498e

Browse files
author
Jeroen van der Heijden
committed
Merge branch 'master' of github.com:thingsdb/python-thingsdb
2 parents 2e7a065 + 2627165 commit 315498e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

thingsdb/model/proptypes.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ def any_(v, klass, collection):
1414
return collection._get_enum_member(*v['%'])
1515
if '$' in v:
1616
return PropTypes.set_(v, nested=functools.partial(
17+
PropTypes.thing_,
1718
klass=klass,
1819
collection=collection
1920
))
@@ -31,6 +32,12 @@ def any_(v, klass, collection):
3132
# TODO : Return correct exception
3233
return Exception(msg)
3334
logging.warning(f'unhandled dict: {v}')
35+
if isinstance(v, list):
36+
return PropTypes.array_(v, nested=functools.partial(
37+
PropTypes.any_,
38+
klass=klass,
39+
collection=collection
40+
))
3441
return v
3542

3643
@staticmethod

0 commit comments

Comments
 (0)