Skip to content

Commit

Permalink
await updateAll in getDuplicates to handle potential errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Pranay-Pandey committed Oct 27, 2024
1 parent ca500b0 commit 566e5c2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/src/services/duplicate.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ export class DuplicateService extends BaseService {
},
);
if (uniqueAssetIds.length > 0) {
void this.assetRepository.updateAll(uniqueAssetIds, { duplicateId: null });
try {
await this.assetRepository.updateAll(uniqueAssetIds, { duplicateId: null });
} catch (error: any) {
this.logger.error(`Failed to remove duplicateId from assets: ${error.message}`);
}
}
return duplicates;
}
Expand Down

0 comments on commit 566e5c2

Please sign in to comment.