Skip to content

Commit 51d994e

Browse files
committed
should merge existing data before saving
1 parent e031d42 commit 51d994e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/User/register.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ export default class RegisterController {
1414
const user = new User()
1515
user.useTransaction(trx)
1616

17-
await user.save()
1817
user.merge({ email })
18+
await user.save()
1919
const key = faker.string.numeric(5) + user.id
2020
user.related('keys').create({ key })
2121

0 commit comments

Comments
 (0)