Skip to content

Commit

Permalink
fixed files import job (#3418)
Browse files Browse the repository at this point in the history
Co-authored-by: Stefano Ricci <[email protected]>
  • Loading branch information
SteRiccio and SteRiccio authored May 8, 2024
1 parent ff294e0 commit fbfe0c6
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ export default class FilesImportJob extends Job {
async deleteOrphanFiles() {
const { context, tx } = this
const { dryRun, filesToDeleteByUuid, updatedFilesByUuid, surveyId } = context

if (Objects.isEmpty(filesToDeleteByUuid)) return

const filesToDeleteArray = Object.values(filesToDeleteByUuid)
for await (const file of filesToDeleteArray) {
const fileUuid = RecordFile.getUuid(file)
Expand Down

0 comments on commit fbfe0c6

Please sign in to comment.