Skip to content

Commit e27c30a

Browse files
committed
Adjust PeriodicReport.update to use version returned instead of fetching again
Also doesn't reference uploadId now
1 parent 49366a4 commit e27c30a

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/components/periodic-report/periodic-report.service.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,16 @@ export class PeriodicReportService {
7272
const updated = await this.repo.updateProperties(current, simpleChanges);
7373

7474
if (reportFile) {
75-
await this.files.updateDefinedFile(
75+
const file = await this.files.updateDefinedFile(
7676
current.reportFile,
7777
'file',
78-
input.reportFile,
79-
session,
80-
);
81-
const newVersion = await this.files.getFileVersion(
82-
reportFile.uploadId,
78+
reportFile,
8379
session,
8480
);
8581
await this.eventBus.publish(
8682
new PeriodicReportUploadedEvent(
8783
updated,
88-
this.files.asDownloadable(newVersion),
84+
this.files.asDownloadable(file.newVersion),
8985
session,
9086
),
9187
);

0 commit comments

Comments
 (0)