Skip to content

Commit

Permalink
TM and PT tickets cannot be set if they are empty strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Johanna Ahlskog committed Oct 4, 2023
1 parent f11bc5b commit e4ceefd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/ResponseBodyBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class ResponseBodyBuilder {
if (!threatModelingDate) {
return this;
} else {
if (!tmNumberOfActiveTickets && !tmNumberOfClosedTickets) {
if ((!tmNumberOfActiveTickets && !tmNumberOfClosedTickets) || ((tmNumberOfActiveTickets && tmNumberOfClosedTickets) !== '')) {
this.responseBody.tmNumberOfActiveTickets = tmNumberOfActiveTickets;
this.responseBody.tmNumberOfClosedTickets = tmNumberOfClosedTickets;
}
Expand Down Expand Up @@ -135,7 +135,7 @@ export class ResponseBodyBuilder {
if (!pentestDate) {
return this;
} else {
if (!ptNumberOfActiveTickets && !ptNumberOfClosedTickets) {
if ((!ptNumberOfActiveTickets && !ptNumberOfClosedTickets) || ((ptNumberOfActiveTickets && ptNumberOfClosedTickets) !== '')) {
this.responseBody.ptNumberOfActiveTickets = ptNumberOfActiveTickets;
this.responseBody.ptNumberOfClosedTickets = ptNumberOfClosedTickets;
}
Expand Down

0 comments on commit e4ceefd

Please sign in to comment.