Increase security and reformat
This commit is contained in:
@@ -15,8 +15,12 @@ def event_ledger_enabled() -> bool:
|
||||
|
||||
def event_ledger_status() -> dict:
|
||||
return {
|
||||
"event_ledger_dual_write": bool(getattr(settings, "EVENT_LEDGER_DUAL_WRITE", False)),
|
||||
"event_primary_write_path": bool(getattr(settings, "EVENT_PRIMARY_WRITE_PATH", False)),
|
||||
"event_ledger_dual_write": bool(
|
||||
getattr(settings, "EVENT_LEDGER_DUAL_WRITE", False)
|
||||
),
|
||||
"event_primary_write_path": bool(
|
||||
getattr(settings, "EVENT_PRIMARY_WRITE_PATH", False)
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
@@ -61,9 +65,7 @@ def append_event_sync(
|
||||
if not normalized_type:
|
||||
raise ValueError("event_type is required")
|
||||
|
||||
candidates = {
|
||||
str(choice[0]) for choice in ConversationEvent.EVENT_TYPE_CHOICES
|
||||
}
|
||||
candidates = {str(choice[0]) for choice in ConversationEvent.EVENT_TYPE_CHOICES}
|
||||
if normalized_type not in candidates:
|
||||
raise ValueError(f"unsupported event_type: {normalized_type}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user