Commit 9e961fe0 authored by Michael Lange's avatar Michael Lange
Browse files

Ensure the task group is present whenever an allocation row is rendered

Showing with 8 additions and 0 deletions
+8 -0
......@@ -58,6 +58,9 @@ function qualifyJob() {
job,
originalJobId: null,
});
if (job.get('isPartial')) {
job.reload();
}
} else {
this.get('store')
.findRecord('job', allocation.get('originalJobId'))
......
......@@ -84,6 +84,11 @@ export default Model.extend({
taskGroups: fragmentArray('task-group', { defaultValue: () => [] }),
summary: belongsTo('job-summary'),
// A job model created from the jobs list response will be lacking
// task groups. This is an indicator that it needs to be reloaded
// if task group information is important.
isPartial: equal('taskGroups.length', 0),
// If a job has only been loaded through the list request, the task groups
// are still unknown. However, the count of task groups is available through
// the job-summary model which is embedded in the jobs list response.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment