We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Reference
1 parent cec75e9 commit 18ee8e6Copy full SHA for 18ee8e6
1 file changed
octopoes/octopoes/models/__init__.py
@@ -265,7 +265,7 @@ def build_token_tree(ooi_class: Type[OOI]) -> Dict:
265
field = ooi_class.model_fields[attribute]
266
value = ""
267
268
- if field.annotation == Reference:
+ if field.annotation in (Reference, Optional[Reference]):
269
from octopoes.models.types import related_object_type
270
271
related_class = related_object_type(field)
0 commit comments