Fix api tests

This commit is contained in:
Rémi de Juvigny 2023-01-25 16:58:37 +01:00
parent caaa14964d
commit 9ef1bea85f
2 changed files with 522 additions and 514 deletions

View File

@ -98,7 +98,9 @@ const updateById = async (id, attributes) => {
populate: ['roles'],
});
strapi.eventHub.emit('user.update', { user: sanitizeUser(updatedUser) });
if (updatedUser) {
strapi.eventHub.emit('user.update', { user: sanitizeUser(updatedUser) });
}
return updatedUser;
};

File diff suppressed because it is too large Load Diff