This commit is contained in:
syuilo 2022-02-03 21:48:23 +09:00
parent 6caec5b8e2
commit 556abfabb9
1 changed files with 2 additions and 3 deletions

View File

@ -51,7 +51,6 @@ export async function importUserLists(job: Bull.Job<DbUserImportJobData>, done:
createdAt: new Date(), createdAt: new Date(),
userId: user.id, userId: user.id,
name: listName, name: listName,
userIds: [],
}).then(x => UserLists.findOneOrFail(x.identifiers[0])); }).then(x => UserLists.findOneOrFail(x.identifiers[0]));
} }
@ -67,9 +66,9 @@ export async function importUserLists(job: Bull.Job<DbUserImportJobData>, done:
target = await resolveUser(username, host); target = await resolveUser(username, host);
} }
if (await UserListJoinings.findOne({ userListId: list.id, userId: target.id }) != null) continue; if (await UserListJoinings.findOne({ userListId: list!.id, userId: target.id }) != null) continue;
pushUserToUserList(target, list); pushUserToUserList(target, list!);
} catch (e) { } catch (e) {
logger.warn(`Error in line:${linenum} ${e}`); logger.warn(`Error in line:${linenum} ${e}`);
} }