Skip to content

Adding a factory for the 'to' property of SuggestedActions#370

Merged
rodrigobr-msft merged 1 commit intomainfrom
users/robrandao/suggested-actions-list-factory
Apr 16, 2026
Merged

Adding a factory for the 'to' property of SuggestedActions#370
rodrigobr-msft merged 1 commit intomainfrom
users/robrandao/suggested-actions-list-factory

Conversation

@rodrigobr-msft
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings April 16, 2026 17:11
@rodrigobr-msft rodrigobr-msft marked this pull request as ready for review April 16, 2026 17:11
@rodrigobr-msft rodrigobr-msft requested a review from a team as a code owner April 16, 2026 17:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the SuggestedActions activity model to avoid a shared mutable default for the to field by switching it to a pydantic.Field(default_factory=list) default, which ensures each model instance gets its own list.

Changes:

  • Replace to: list[...] = [] with to: list[...] = Field(default_factory=list).
  • Add the required Field import from pydantic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rodrigobr-msft rodrigobr-msft merged commit 2908ee3 into main Apr 16, 2026
15 checks passed
@rodrigobr-msft rodrigobr-msft deleted the users/robrandao/suggested-actions-list-factory branch April 16, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SuggestedActions uses a common list as a default value for the to field

3 participants