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