Prevent double deletions
This commit is contained in:
parent
8e8f4ac02d
commit
4ca6982d27
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ export function combineMetadataAndUser(
|
||||||
user.roleId === rolesCore.BUILTIN_ROLE_IDS.PUBLIC
|
user.roleId === rolesCore.BUILTIN_ROLE_IDS.PUBLIC
|
||||||
) {
|
) {
|
||||||
// If it exists and it should not, we must remove it
|
// If it exists and it should not, we must remove it
|
||||||
if (found) {
|
if (found?._id) {
|
||||||
return { ...found, _deleted: true }
|
return { ...found, _deleted: true }
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
|
|
Loading…
Reference in a new issue