Fixes DB models
This commit is contained in:
parent
b97670d939
commit
43b8a07b1d
1 changed files with 5 additions and 0 deletions
|
|
@ -98,6 +98,11 @@ class ChatObjects:
|
||||||
field_type = field_info.annotation # Pydantic v2
|
field_type = field_info.annotation # Pydantic v2
|
||||||
else:
|
else:
|
||||||
field_type = type(value) # Fallback
|
field_type = type(value) # Fallback
|
||||||
|
|
||||||
|
# Always route relational/object fields to object_fields for separate handling
|
||||||
|
if field_name in ['documents', 'stats']:
|
||||||
|
object_fields[field_name] = value
|
||||||
|
continue
|
||||||
|
|
||||||
# Check if this is a JSONB field (Dict, List, or complex types)
|
# Check if this is a JSONB field (Dict, List, or complex types)
|
||||||
if (field_type == dict or
|
if (field_type == dict or
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue