Fix AlertRule initialization to use config_id instead of config_file
Updated init_db.py to use config_id field after database migration, fixing container startup error on new systems. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -98,7 +98,7 @@ def init_default_alert_rules(session):
|
||||
'webhook_enabled': False,
|
||||
'severity': 'critical',
|
||||
'filter_conditions': None,
|
||||
'config_file': None
|
||||
'config_id': None
|
||||
}
|
||||
]
|
||||
|
||||
@@ -113,7 +113,7 @@ def init_default_alert_rules(session):
|
||||
webhook_enabled=rule_data['webhook_enabled'],
|
||||
severity=rule_data['severity'],
|
||||
filter_conditions=rule_data['filter_conditions'],
|
||||
config_file=rule_data['config_file'],
|
||||
config_id=rule_data['config_id'],
|
||||
created_at=datetime.now(timezone.utc),
|
||||
updated_at=datetime.now(timezone.utc)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user