Add logging to save_item_metadata for debugging
Track when items are being saved to database to diagnose why recipes show 0 in stats but effects show correctly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -641,6 +641,9 @@ async def save_item_metadata(
|
|||||||
|
|
||||||
Returns a dict with the item metadata (compatible with old JSON format).
|
Returns a dict with the item metadata (compatible with old JSON format).
|
||||||
"""
|
"""
|
||||||
|
import logging
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
logger.info(f"save_item_metadata: cid={cid[:16] if cid else None}..., actor_id={actor_id}, item_type={item_type}")
|
||||||
# Build metadata JSONB for extra fields
|
# Build metadata JSONB for extra fields
|
||||||
metadata = {}
|
metadata = {}
|
||||||
if tags:
|
if tags:
|
||||||
@@ -677,6 +680,7 @@ async def save_item_metadata(
|
|||||||
)
|
)
|
||||||
|
|
||||||
item_type_id = row["id"]
|
item_type_id = row["id"]
|
||||||
|
logger.info(f"save_item_metadata: Created/updated item_type id={item_type_id} for cid={cid[:16]}...")
|
||||||
|
|
||||||
# Handle pinning
|
# Handle pinning
|
||||||
if pinned and pin_reason:
|
if pinned and pin_reason:
|
||||||
|
|||||||
Reference in New Issue
Block a user