From 4c832ad36c12d78fb6db3037540f3cbd5eb19d7b Mon Sep 17 00:00:00 2001 From: Sabe Jones Date: Mon, 15 Apr 2019 12:31:19 -0500 Subject: [PATCH] fix(claiming): better sync and notif handling --- website/client/libs/asyncResource.js | 2 +- website/server/controllers/api-v3/tasks/groups.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/website/client/libs/asyncResource.js b/website/client/libs/asyncResource.js index 852cac06e5..c620295865 100644 --- a/website/client/libs/asyncResource.js +++ b/website/client/libs/asyncResource.js @@ -33,7 +33,7 @@ export function loadAsyncResource ({store, path, url, deserialize, forceLoad = f } }); }); - } else if (loadingStatus === 'NOT_LOADED' || loadingStatus === 'LOADED' && forceLoad) { + } else if (loadingStatus === 'NOT_LOADED' || forceLoad) { return axios.get(url).then(response => { // TODO support more params resource.loadingStatus = 'LOADED'; // deserialize can be a promise diff --git a/website/server/controllers/api-v3/tasks/groups.js b/website/server/controllers/api-v3/tasks/groups.js index 69f050ad3d..6aeaf68842 100644 --- a/website/server/controllers/api-v3/tasks/groups.js +++ b/website/server/controllers/api-v3/tasks/groups.js @@ -331,6 +331,7 @@ api.approveTask = { // Remove old notifications let approvalPromises = []; managers.forEach((manager) => { + if (manager._id === task.group.approval.approvingUser) return; let notificationIndex = manager.notifications.findIndex(function findNotification (notification) { return notification && notification.data && notification.data.taskId === task._id && notification.type === 'GROUP_TASK_APPROVAL'; });