Skip to content

Commit 9cca88d

Browse files
authored
fix: return 404 when updating a missing member profile (#4351)
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
1 parent 4869d82 commit 9cca88d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

backend/src/database/repositories/memberRepository.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -845,12 +845,12 @@ class MemberRepository {
845845
transaction,
846846
})
847847

848-
captureOldState(record.get({ plain: true }))
849-
850848
if (!record) {
851849
throw new Error404()
852850
}
853851

852+
captureOldState(record.get({ plain: true }))
853+
854854
// exclude syncRemote attributes, since these are populated from memberSyncRemote table
855855
if (data.attributes?.syncRemote) {
856856
delete data.attributes.syncRemote

0 commit comments

Comments
 (0)