forked from cardosofelipe/fast-next-template
refactor(safety): apply consistent formatting across services and tests
Improved code readability and uniformity by standardizing line breaks, indentation, and inline conditions across safety-related services, models, and tests, including content filters, validation rules, and emergency controls.
This commit is contained in:
@@ -196,9 +196,7 @@ class AuditLogger:
|
||||
) -> AuditEvent:
|
||||
"""Log an action execution result."""
|
||||
event_type = (
|
||||
AuditEventType.ACTION_EXECUTED
|
||||
if success
|
||||
else AuditEventType.ACTION_FAILED
|
||||
AuditEventType.ACTION_EXECUTED if success else AuditEventType.ACTION_FAILED
|
||||
)
|
||||
|
||||
return await self.log(
|
||||
@@ -477,9 +475,7 @@ class AuditLogger:
|
||||
"user_id": event.user_id,
|
||||
"decision": event.decision.value if event.decision else None,
|
||||
"details": {
|
||||
k: v
|
||||
for k, v in event.details.items()
|
||||
if not k.startswith("_")
|
||||
k: v for k, v in event.details.items() if not k.startswith("_")
|
||||
},
|
||||
"correlation_id": event.correlation_id,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user