Commit 102dd835 authored by nanahira's avatar nanahira

fix

parent 8912eb3e
Pipeline #15311 passed with stages
in 1 minute and 24 seconds
......@@ -400,7 +400,7 @@ export class AppService extends ConsoleLogger {
}
async migrateHashes() {
const archivesToDo = await this.db.getRepository(Archive).find({ where: { hash: IsNull() }, select: ['id', 'hash', 'path'] });
const archivesToDo = await this.db.getRepository(Archive).find({ where: { hash: IsNull() }, select: ['path'] });
const hashMapToUpdate = new Map<string, string>();
for (const archive of archivesToDo) {
if (hashMapToUpdate.has(archive.path)) {
......@@ -408,8 +408,7 @@ export class AppService extends ConsoleLogger {
}
const hash = await this.getHashForMigrate(archive);
if (hash) {
archive.hash = await this.getHashForMigrate(archive);
hashMapToUpdate.set(archive.path, archive.hash);
hashMapToUpdate.set(archive.path, hash);
}
}
await this.db.transaction(async (edb) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment