Skip to content

Commit 6ffd1ef

Browse files
committed
Update forward references for recursive block types
- Modified `blocks.py` and `message_body.py` to use `update_forward_refs()` instead of deprecated `model_rebuild()`
1 parent 3acb11d commit 6ffd1ef

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

elementary/messages/blocks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,5 @@ class ExpandableBlock(BaseBlock):
109109
"ExpandableBlock",
110110
]
111111

112-
ExpandableBlock.model_rebuild()
112+
# Update forward references for recursive types
113+
ExpandableBlock.update_forward_refs()

elementary/messages/message_body.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ class MessageBody(BaseModel):
3434
color: Optional[Color] = None
3535

3636

37-
MessageBody.model_rebuild()
37+
MessageBody.update_forward_refs()

0 commit comments

Comments
 (0)