Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Commit d5f2a3a

Browse files
committed
fix contribution delete shout bug
1 parent ff7d9fc commit d5f2a3a

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

server/hooks/cleanup-related-items.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ const deleteItem = async (item, connection, hook) => {
2525
await hook.app.service(connection.service)
2626
.remove(null, { query });
2727
} catch (err) {
28-
throw new Error(err);
28+
hook.app.error(`issue while deleting related item '${connection.service}'`);
29+
hook.app.error(query);
2930
}
3031

3132
};

server/services/shouts/shouts.hooks.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ module.exports = {
5353
patch: [
5454
setShoutCount()
5555
],
56-
remove: [
57-
setShoutCount()
58-
]
56+
remove: []
5957
},
6058

6159
error: {

0 commit comments

Comments
 (0)