1
0
Fork 0
mirror of synced 2024-07-07 15:25:52 +12:00

Prevent double deletions

This commit is contained in:
adrinr 2023-03-31 11:25:51 +01:00
parent 8e8f4ac02d
commit 4ca6982d27

View file

@ -22,7 +22,7 @@ export function combineMetadataAndUser(
user.roleId === rolesCore.BUILTIN_ROLE_IDS.PUBLIC
) {
// If it exists and it should not, we must remove it
if (found) {
if (found?._id) {
return { ...found, _deleted: true }
}
return null