mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-04-09 06:25:35 -04:00
fix: preserve stored recipe slugs during hydration (#7294)
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com> Co-authored-by: Michael Genson <genson.michael@gmail.com>
This commit is contained in:
@@ -61,3 +61,16 @@ def test_recipe_string_sanitation(field: str, val: Any, expected: Any):
|
||||
)
|
||||
|
||||
assert getattr(recipe, field) == expected
|
||||
|
||||
|
||||
def test_recipe_preserves_existing_slug():
|
||||
recipe = RecipeSummary(
|
||||
id=uuid4(),
|
||||
user_id=uuid4(),
|
||||
household_id=uuid4(),
|
||||
group_id=uuid4(),
|
||||
name="Bols nourrissants (copie de Zuppa)",
|
||||
slug="nourish-bowls-zuppa-copycat",
|
||||
)
|
||||
|
||||
assert recipe.slug == "nourish-bowls-zuppa-copycat"
|
||||
|
||||
Reference in New Issue
Block a user