diff --git a/app/services/recipe_service.py b/app/services/recipe_service.py index dfe5ad2..96d37d3 100644 --- a/app/services/recipe_service.py +++ b/app/services/recipe_service.py @@ -127,15 +127,19 @@ class RecipeService: # Check if cache has a list method for recipes if hasattr(self.cache, 'list_by_type'): items = self.cache.list_by_type('recipe') - logger.info(f"Found {len(items)} recipe items in cache") + logger.info(f"Found {len(items)} recipe items in cache for actor_id={actor_id}") for content_hash in items: recipe = await self.get_recipe(content_hash) if recipe: uploader = recipe.get("uploader") - logger.info(f"Recipe {content_hash[:12]}: uploader={uploader}, actor_id={actor_id}") + owner = recipe.get("owner") + logger.info(f"Recipe {content_hash[:12]}: name={recipe.get('name')}, uploader={uploader}, owner={owner}, actor_id={actor_id}") # Filter by actor - L1 is per-user - if actor_id is None or uploader == actor_id: + # Check both uploader and owner fields for flexibility + if actor_id is None or uploader == actor_id or owner == actor_id: recipes.append(recipe) + else: + logger.warning("Cache does not have list_by_type method") # Sort by name recipes.sort(key=lambda r: r.get("name", ""))