CivicTechFredericton / mealplanner

Primary Meal Planner repo
MIT License
9 stars 18 forks source link

[BUG] Substitute ingredient should not have the same ingredient itself #679

Open shanthisa opened 6 months ago

shanthisa commented 6 months ago

Describe the bug In admin UI, while adding a primary ingredient to a substitute ingredient, the same ingredient should not appear in the list. For example, milk cannot be a primary ingredient for the ingredient milk.

To Reproduce Steps to reproduce the behaviour:

  1. Go to 'admin UI'
  2. Click on 'Meals' -> Ingredients
  3. Click on Edit of any ingredient Eg: Milk
  4. In the primary ingredient field which is meant to say which primary ingredient this ingredient is substitute of has also the same ingredient 'Milk' in the list.

Expected behaviour The same ingredient should not appear in the primary ingredient field.