fix(xapi/task_create): remove duplicate [XO] prefix

Found while investigating xoa-support#3553
This commit is contained in:
Julien Fontanet 2021-03-28 14:24:45 +02:00
parent 6038dc9c8a
commit 021810201b

View File

@ -2,7 +2,9 @@ const ignoreErrors = require('promise-toolbox/ignoreErrors')
module.exports = class Task {
create(name = 'untitled task', description) {
return this.createTask(`[XO] ${name}`, description)
// don't call `this.createTask` which might be overriden by
// child class and already has the [XO] prefix
return super.createTask(`[XO] ${name}`, description)
}
destroy(ref) {