Skip to content
Snippets Groups Projects
Commit e733b462 authored by mechtelm's avatar mechtelm
Browse files

bugfix sending unit log after terminate #134

parent 23d8582f
No related branches found
No related tags found
No related merge requests found
...@@ -16,7 +16,7 @@ import { ...@@ -16,7 +16,7 @@ import {
import {BackendService} from './backend.service'; import {BackendService} from './backend.service';
import {Router} from "@angular/router"; import {Router} from "@angular/router";
import {TestMode} from "../config/test-mode"; import {TestMode} from "../config/test-mode";
import { BookletConfig } from '../config/booklet-config'; import {BookletConfig} from '../config/booklet-config';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
...@@ -214,7 +214,7 @@ export class TestControllerService { ...@@ -214,7 +214,7 @@ export class TestControllerService {
} }
} }
public addUnitLog(unitDbKey: string, logKey: LogEntryKey, entry = '') { public addUnitLog(unitDbKey: string, logKey: LogEntryKey, entry = '') {
if (this.testMode.saveResponses) { if (this.testMode.saveResponses && this.testStatus$.getValue() === TestStatus.RUNNING) {
this.bs.addUnitLog(this.testId, Date.now(), unitDbKey, this.bs.addUnitLog(this.testId, Date.now(), unitDbKey,
entry.length > 0 ? logKey + ': ' + JSON.stringify(entry) : logKey).subscribe(ok => { entry.length > 0 ? logKey + ': ' + JSON.stringify(entry) : logKey).subscribe(ok => {
if (!ok) { if (!ok) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment