Skip to content

Commit bafb4cb

Browse files
committed
Database: FIX data type check.
1 parent 6f69dd9 commit bafb4cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dp3/database/database.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1571,7 +1571,7 @@ def get_distinct_val_count(self, etype: str, attr: str) -> dict[Any, int]:
15711571
raise DatabaseError(f"Attribute '{attr}' isn't plain or observations")
15721572

15731573
# Attribute data type must be primitive, array<T> or set<T>
1574-
if attr_spec.data_type.root in ("dict", "json"):
1574+
if any(needle in attr_spec.data_type.root for needle in ("dict", "json")):
15751575
raise DatabaseError(
15761576
f"Data type '{attr_spec.data_type}' of attribute '{attr}' is not processable"
15771577
)

0 commit comments

Comments
 (0)