fix update ingredients

This commit is contained in:
efrilm
2026-04-16 15:44:13 +07:00
parent 535e4c84f6
commit 3db4afbce6
2 changed files with 9 additions and 2 deletions
+4 -1
View File
@@ -180,7 +180,10 @@ func (p *IngredientProcessorImpl) UpdateIngredient(ctx context.Context, id uuid.
}
// Update fields
existingIngredient.OutletID = req.OutletID
if req.OutletID != nil {
existingIngredient.OutletID = req.OutletID
}
existingIngredient.Name = req.Name
existingIngredient.UnitID = req.UnitID
existingIngredient.Cost = req.Cost