Repository navigation
fix: preserve recipe ingredient and instruction fields on updates - #38
Open
nosuntoday wants to merge 1 commit into
Open
nosuntoday wants to merge 1 commit into
nosuntoday wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Preserve originalText, referenced recipes, substitutions, instruction identifiers and note references when round-tripping structured recipe content. Keep readable ingredient display text on reads and omit it on writes so Mealie recomputes it. Optional older isFood/disableAmount flags survive when supplied and remain absent when omitted. A plain ingredient string remains an unparsed text note. Mealie may regenerate step IDs on PUT.
Refs #34. This is an independent change against current main (
86ebf379536cf2b3a07c2007798db02894c51f21); it does not include the other proposed fixes.Validation:
ruff check src testspasses.Version-shaped regressions cover both 3.28 and 3.29, including preservation of unmodelled duration fields during a PUT. Native probes verified original text, note-only substitutions, ingredient/step references, and untouched time values. No compatibility claim for every historical Mealie release; old ingredient flag defaults are not invented.
Structured-duration concise reads and explicit time-text replacement are handled separately by #35, included in the combined verification; this PR does not replace that fix. No broader historical-version compatibility or production deployment is claimed. Prepared with AI assistance and reviewed locally.