Add wasPreempted bool to allocs

This commit is contained in:
Michael Lange
2019-04-16 13:23:16 -07:00
parent c456c5eed0
commit 384a0e5a54
2 changed files with 2 additions and 0 deletions

View File

@@ -48,6 +48,7 @@ export default Model.extend({
preemptedAllocations: hasMany('allocation', { inverse: 'preemptedByAllocation' }),
preemptedByAllocation: belongsTo('allocation', { inverse: 'preemptedAllocations' }),
wasPreempted: attr('boolean'),
followUpEvaluation: belongsTo('evaluation'),

View File

@@ -47,6 +47,7 @@ export default ApplicationSerializer.extend({
hash.PreemptedAllocationIDs = hash.PreemptedAllocations || [];
hash.PreemptedByAllocationID = hash.PreemptedByAllocation || null;
hash.WasPreempted = !!hash.PreemptedByAllocationID;
return this._super(typeHash, hash);
},