Prevent double deletions

This commit is contained in:
adrinr 2023-03-31 11:25:51 +01:00
parent 8e8f4ac02d
commit 4ca6982d27
1 changed files with 1 additions and 1 deletions

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