fix: Use getattr() instead of .get() for rotation_config

- RotationConfig is a Pydantic model, not a dictionary
- Use getattr() to safely access notifyerrors attribute
- Fixes AttributeError when accessing rotation_config attributes
parent 3beaded8
......@@ -818,7 +818,7 @@ class RotationHandler:
raise HTTPException(status_code=400, detail=f"Rotation {rotation_id} not found")
# Check if notifyerrors is enabled for this rotation
notify_errors = rotation_config.get('notifyerrors', False)
notify_errors = getattr(rotation_config, 'notifyerrors', False)
logger.info(f"Rotation config loaded successfully")
providers = rotation_config.providers
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment