From b03bda68ad8e0a7a2551e6b2f9b729d4a4cee5d1 Mon Sep 17 00:00:00 2001 From: Gobot1234 Date: Fri, 12 Apr 2024 00:40:40 +0100 Subject: [PATCH] fix: oops forgot to look at console --- apps/anvil/src/seeder/seeds/users.seed.ts | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/apps/anvil/src/seeder/seeds/users.seed.ts b/apps/anvil/src/seeder/seeds/users.seed.ts index 3ebeea4..ec8be37 100644 --- a/apps/anvil/src/seeder/seeds/users.seed.ts +++ b/apps/anvil/src/seeder/seeds/users.seed.ts @@ -49,15 +49,17 @@ export async function seedUsers(dbService: EdgeDBService) { userAgreement.length > 0 ? userAgreement[0] : await dbService.query( - e.update(e.sign_in.SignInReason, (reason) => ({ - filter_single: e.op(reason.category, "=", e.sign_in.SignInReasonCategory.PERSONAL_PROJECT), - set: { - agreement: e.insert(e.sign_in.Agreement, { - content: readFileSync(ua, { encoding: "utf-8" }), - content_hash: computeFileHash(ua), - }), - }, - })), + e.assert_exists( + e.update(e.sign_in.SignInReason, (reason) => ({ + filter_single: e.op(reason.category, "=", e.sign_in.SignInReasonCategory.PERSONAL_PROJECT), + set: { + agreement: e.insert(e.sign_in.Agreement, { + content: readFileSync(ua, { encoding: "utf-8" }), + content_hash: computeFileHash(ua), + }), + }, + })).agreement, + ), ); const rep_agreement =