Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Invalid Pydantic Definition On Group Model #3264

Merged

Conversation

michael-genson
Copy link
Collaborator

What type of PR is this?

(REQUIRED)

  • bug

What this PR does / why we need it:

(REQUIRED)

This week on "how did this used to work?", we replaced an invalid model field definition:

webhooks: list[Any] = []

...with two new ones:

class UpdateGroup(GroupBase):
  ...
  webhooks: list[CreateWebhook] = []

class GroupInDB(UpdateGroup):
  ...
  webhooks: list[ReadWebhook] = []

Which issue(s) this PR fixes:

(REQUIRED)

Fixes #3260

Special notes for your reviewer:

(fill-in or delete this section)

Maybe Pydantic used to automatically serialize unknown models into dicts? I have no idea.

Testing

(fill-in or delete this section)

Through the frontend I created a group, added/updated webhooks, and updated the group.

Copy link
Collaborator

@hay-kot hay-kot left a comment

Choose a reason for hiding this comment

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

???? This makes no sense. Thanks for fixing this!

@hay-kot hay-kot merged commit b1278b4 into mealie-recipes:mealie-next Mar 7, 2024
9 checks passed
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.

[BUG] - Default group is missing after upgrade from 1.2.0 to 1.3.0
2 participants