mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-20 23:45:22 +08:00
fix(operation-trace): satisfy ruff/codeql and drop a dead summary channel
- Remove the unused request_summary local: the stored summary is derived by the service from changes + the classified action, so handlers publishing quart.g.operation_log_summary was a dead channel that never reached the row. - Drop the unused datetime import in the operation log model. - Apply ruff format to the touched files so `ruff format --check` passes.
This commit is contained in:
@@ -413,12 +413,13 @@ class RouterGroup(abc.ABC):
|
||||
# static route declaration cannot describe the runtime diff, e.g.
|
||||
# the previous and the new role of a member. ``quart.g`` is
|
||||
# request-local, so concurrent requests never share these values.
|
||||
# The stored summary is derived by the service from ``changes`` and
|
||||
# the classified action, so handlers only publish the diff itself.
|
||||
changes = resolved_meta.get('changes')
|
||||
detail = resolved_meta.get('detail')
|
||||
request_changes = getattr(quart.g, 'operation_log_changes', None)
|
||||
request_detail = getattr(quart.g, 'operation_log_detail', None)
|
||||
request_resource_id = getattr(quart.g, 'operation_log_resource_id', None)
|
||||
request_summary = getattr(quart.g, 'operation_log_summary', None)
|
||||
if request_changes:
|
||||
changes = request_changes
|
||||
if request_detail:
|
||||
|
||||
Reference in New Issue
Block a user