Add POI feature and imporve the overall backend implementation

This commit is contained in:
Urtzi Alfaro
2025-11-12 15:34:10 +01:00
parent e8096cd979
commit 5783c7ed05
173 changed files with 16862 additions and 9078 deletions

View File

@@ -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