Ensure that the items added to worklists have the required attributes

It seems that the current checks were sometimes insufficient. This
fixes a bug which intermittently appeared, where the item_id was
missing from the worklist item POST request.

Change-Id: I9bd33b5ce775ba8dee906f931647b68f3582e68c
This commit is contained in:
Adam Coldrick
2016-01-28 13:19:18 +00:00
parent 35deafc893
commit af54c014d7

View File

@@ -64,6 +64,10 @@ angular.module('sb.worklist').controller('WorklistAddItemController',
item_type = 'story';
}
if (!item.hasOwnProperty('value')) {
item.value = item.id;
}
var params = {
item_id: item.value,
id: $scope.worklist.id,