Skip to content

Commit

Permalink
fix the db seed (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmintey authored Oct 18, 2023
1 parent 383cff0 commit 88102e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prisma/seed.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const roles = async () => {

const groups = async () => {
const groupCount = await prisma.group.count();
const userCount = await prisma.authUser.count();
const userCount = await prisma.user.count();

if (userCount > 0 && groupCount === 0) {
const defaultGroup = await prisma.group.create({
Expand All @@ -49,7 +49,7 @@ const groups = async () => {
}
});

const allUsers = await prisma.authUser.findMany();
const allUsers = await prisma.user.findMany();
for (const user of allUsers) {
await prisma.userGroupMembership.create({
data: {
Expand Down

0 comments on commit 88102e1

Please sign in to comment.