github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/ui/app/serializers/drain-strategy.js (about) 1 import ApplicationSerializer from './application'; 2 import classic from 'ember-classic-decorator'; 3 4 @classic 5 export default class DrainStrategy extends ApplicationSerializer { 6 normalize(typeHash, hash) { 7 // TODO API: finishedAt is always marshaled as a date even when unset. 8 // To simplify things, unset it here when it's the empty date value. 9 if (hash.ForceDeadline === '0001-01-01T00:00:00Z') { 10 hash.ForceDeadline = null; 11 } 12 13 return super.normalize(typeHash, hash); 14 } 15 }