Skip to content

Commit

Permalink
QFIX: Child info could be empty (#3785)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Sobolev <[email protected]>
  • Loading branch information
haiodo authored Oct 4, 2023
1 parent 9a4fa75 commit c6065d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/tracker/src/migration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ async function fixSpentTime (client: MigrationClient): Promise<void> {
const issues = await client.find<Issue>(DOMAIN_TASK, { reportedTime: { $gt: 0 } })
for (const issue of issues) {
const childInfo = issue.childInfo
for (const child of childInfo) {
for (const child of childInfo ?? []) {
child.reportedTime = child.reportedTime * 8
}
await client.update(DOMAIN_TASK, { _id: issue._id }, { reportedTime: issue.reportedTime * 8, childInfo })
Expand Down

0 comments on commit c6065d0

Please sign in to comment.