YARN-8086. ManagedParentQueue with no leaf queues cause JS error in new UI. (Suma Shivaprasad via wangda)
Change-Id: I6d82af91adec02698afddde6883b1fe1924e6041
This commit is contained in:
parent
8fb00c3fce
commit
e7e20190df
|
@ -24,7 +24,7 @@ export default DS.JSONAPISerializer.extend({
|
|||
normalizeSingleResponse(store, primaryModelClass, payload, id,
|
||||
requestType) {
|
||||
var children = [];
|
||||
if (payload.queues) {
|
||||
if (payload.queues && payload.queues.queue) {
|
||||
payload.queues.queue.forEach(function(queue) {
|
||||
children.push(queue.queueName);
|
||||
});
|
||||
|
@ -122,7 +122,7 @@ export default DS.JSONAPISerializer.extend({
|
|||
data.push(result.queue);
|
||||
includedData = includedData.concat(result.includedData);
|
||||
|
||||
if (payload.queues) {
|
||||
if (payload.queues && payload.queues.queue) {
|
||||
for (var i = 0; i < payload.queues.queue.length; i++) {
|
||||
var queue = payload.queues.queue[i];
|
||||
queue.myParent = payload.queueName;
|
||||
|
|
Loading…
Reference in New Issue