Skip to content

[BUG] - 500 Internal Server Error when Patching Recipe Tags #6802

@SimeonSouttar

Description

@SimeonSouttar

First Check

  • This is not a feature request.
  • I added a very descriptive title to this issue (title field is above this).
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the Mealie documentation, with the integrated search.
  • I already read the docs and didn't find an answer.
  • This issue can be replicated on the demo site (https://demo.mealie.io/).

What is the issue you are experiencing?

A 500 Internal Server Error is returned by the Mealie API when attempting to PATCH a recipe's tags using the /api/recipes/{slug} endpoint. This occurs when the payload includes new tags that do not yet exist in the database.

It appears related to the RecipeTag schema validation missing the group_id field during the update process, causing a TypeError in the backend when it attempts to initialize the tag object.

Steps to Reproduce

  1. Have a running instance of Mealie.
  2. Identify an existing recipe slug.
  3. Send a PATCH request to /api/recipes/{slug} with a payload that includes a new tag name that does not exist in the database.

{
  "tags": [
    {
      "name": "New Tag",
      "slug": "new-tag"
    }
  ]
}
  1. Observe the 500 Internal Server Error response.

Please provide relevant logs

TypeError: init() missing 1 required positional argument: 'group_id'
(Note: This is the expected traceback based on similar reports; please confirm with your actual server logs if available).

Mealie Version

Build ID: 4fbace36-29e6-4cd6-94f8-f7445fd74855

Deployment

Other (please specify below)

Additional Deployment Details

Proxmox LXC Container

Interacting with Mealie via Python script using urllib. The issue is reproducible consistently via API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions