Fix new services implementation 5
This commit is contained in:
@@ -90,6 +90,13 @@ class IngredientRepository(BaseRepository[Ingredient, IngredientCreate, Ingredie
|
||||
) -> List[Ingredient]:
|
||||
"""Get ingredients for a tenant with filtering"""
|
||||
try:
|
||||
# Handle search filter separately since it requires special query logic
|
||||
if filters and filters.get('search'):
|
||||
search_term = filters['search']
|
||||
logger.info(f"Searching ingredients with term: '{search_term}'", tenant_id=tenant_id)
|
||||
return await self.search_ingredients(tenant_id, search_term, skip, limit)
|
||||
|
||||
# Handle other filters with standard multi-get
|
||||
query_filters = {'tenant_id': tenant_id}
|
||||
if filters:
|
||||
if filters.get('category'):
|
||||
|
||||
Reference in New Issue
Block a user