Skip to content

Commit

Permalink
Fix pydantic validation Component model
Browse files Browse the repository at this point in the history
  • Loading branch information
vadim-su committed Dec 29, 2023
1 parent bb22e56 commit e0bf6a4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions asyncord/client/models/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,3 +404,6 @@ def validate_components(cls, components: list[Component | TextInput]) -> list[Co


Component = Annotated[ActionRow | Button | SelectMenu, Field(discriminator='type')]

# Rebuild ActionRow model to add `components` field after Component type created.
ActionRow.model_rebuild()

0 comments on commit e0bf6a4

Please sign in to comment.