Add POI feature and imporve the overall backend implementation
This commit is contained in:
@@ -332,7 +332,10 @@ class IngredientRepository(BaseRepository[Ingredient, IngredientCreate, Ingredie
|
||||
'ingredient': ingredient,
|
||||
'current_stock': float(current_stock) if current_stock else 0.0,
|
||||
'threshold': ingredient.low_stock_threshold,
|
||||
'needs_reorder': current_stock <= ingredient.reorder_point if current_stock else True
|
||||
'needs_reorder': (
|
||||
current_stock <= ingredient.reorder_point
|
||||
if current_stock and ingredient.reorder_point is not None else True
|
||||
)
|
||||
})
|
||||
|
||||
return results
|
||||
|
||||
Reference in New Issue
Block a user