From e659fefd96c7bf1ac1e04628f4017bb0f7d6e567 Mon Sep 17 00:00:00 2001 From: Andrey Zhavoronkov <41117609+azhavoro@users.noreply.github.com> Date: Tue, 7 Apr 2020 17:14:46 +0300 Subject: [PATCH] Added missed fields in exception logs (#1372) --- CHANGELOG.md | 1 + cvat-core/src/log.js | 15 +++++---------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4678c31ded5d..c0966b228f18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Hidden points (or outsided) are visible after changing a frame - Merge is allowed for points, but clicks on points conflict with frame dragging logic - Removed objects are visible for search +- Add missed task_id and job_id fields into exception logs for the new UI (https://github.com/opencv/cvat/pull/1372) ### Security - diff --git a/cvat-core/src/log.js b/cvat-core/src/log.js index 68cce5c5d5a1..cf3df86d86fe 100644 --- a/cvat-core/src/log.js +++ b/cvat-core/src/log.js @@ -195,12 +195,11 @@ class LogWithExceptionInfo extends Log { } dump() { - const payload = { ...this.payload }; + let body = super.dump(); + const payload = body.payload; const client = detect(); - const body = { - client_id: payload.client_id, - name: this.type, - time: this.time.toISOString(), + body = { + ...body, message: payload.message, filename: payload.filename, line: payload.line, @@ -211,17 +210,13 @@ class LogWithExceptionInfo extends Log { version: client.version, }; - delete payload.client_id; delete payload.message; delete payload.filename; delete payload.line; delete payload.column; delete payload.stack; - return { - ...body, - payload, - }; + return body; } }