From 8dd47e770f921173e3f4af4265ca902d223f7e09 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 6 Feb 2020 11:25:02 +0100 Subject: [PATCH] fix background task check --- static/js/item.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/item.js b/static/js/item.js index c5045d1f..8de8740f 100644 --- a/static/js/item.js +++ b/static/js/item.js @@ -45,12 +45,12 @@ pandora.ui.item = function() { var note = Ox.Element() .css({marginTop: '32px', fontSize: '12px', textAlign: 'center'}) pandora.$ui.contentPanel.replaceElement(1, note); - if (pandora.user.username == item.user || pandora.hasCapability('canSeeAllTasks')) { + if (pandora.user.username == result.data.user || pandora.hasCapability('canSeeAllTasks')) { pandora.api.getTasks({ user: pandora.hasCapability('canSeeAllTasks') ? '' : pandora.user.username }, function(result_) { var tasks = result_.data.items.filter(function(task) { return task.item == item}) - if (tasks.length == 0) { + if (tasks.length > 0) { html = Ox._( '{0} is currently processed. ' + '{1} view will be available in a moment.',