Skip to content

Commit

Permalink
Fix bug with recursive references
Browse files Browse the repository at this point in the history
  • Loading branch information
ruscoder committed Nov 28, 2024
1 parent 0eb2ba4 commit 3ff835f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.0.a1

- Fix issues with resolving recursive references

## 1.0.0a0

- Breaking changes in the API:
Expand Down
2 changes: 1 addition & 1 deletion fhir_tbs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from .types import FilterBy, SubscriptionDefinitionWithHandler

__title__ = "fhir-tbs-py"
__version__ = "1.0.0a0"
__version__ = "1.0.0a1"
__author__ = "beda.software"
__license__ = "MIT"
__copyright__ = "Copyright 2024 beda.software"
Expand Down
3 changes: 2 additions & 1 deletion fhir_tbs/r4b.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ def _extract_relative_references_recursive(instance: BaseModel) -> BaseModel:
field_value = getattr(instance, field_name)
if isinstance(field_value, list):
for sub_field in field_value:
_extract_relative_references_recursive(sub_field)
if isinstance(field_value, BaseModel):
_extract_relative_references_recursive(sub_field)
if isinstance(field_value, BaseModel):
_extract_relative_references_recursive(field_value)

Expand Down
3 changes: 2 additions & 1 deletion fhir_tbs/r5.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ def _extract_relative_references_recursive(instance: BaseModel) -> BaseModel:
field_value = getattr(instance, field_name)
if isinstance(field_value, list):
for sub_field in field_value:
_extract_relative_references_recursive(sub_field)
if isinstance(field_value, BaseModel):
_extract_relative_references_recursive(sub_field)
if isinstance(field_value, BaseModel):
_extract_relative_references_recursive(field_value)

Expand Down

0 comments on commit 3ff835f

Please sign in to comment.