#6942 toUnbook #2135
|
@ -49,8 +49,7 @@ module.exports = Self => {
|
||||||
|
|
||||||
jorgep marked this conversation as resolved
|
|||||||
if (bookEntry) {
|
if (bookEntry) {
|
||||||
jgallego marked this conversation as resolved
Outdated
alexm
commented
@jgallego veus be la logica? @jgallego veus be la logica?
jgallego
commented
esta ok esta ok
|
|||||||
accountingEntries = await models.Xdiario.count({ASIEN: bookEntry}, myOptions);
|
accountingEntries = await models.Xdiario.count({ASIEN: bookEntry}, myOptions);
|
||||||
|
await models.Xdiario.destroyAll({ASIEN: bookEntry}, myOptions);
|
||||||
await models.Xdiario.destroyAll({where: {ASIEN: bookEntry}}, myOptions);
|
|
||||||
} else {
|
} else {
|
||||||
const linkedBookEntry = await models.Xdiario.findOne({
|
const linkedBookEntry = await models.Xdiario.findOne({
|
||||||
fields: ['ASIEN'],
|
fields: ['ASIEN'],
|
||||||
|
|
Loading…
Reference in New Issue
El numero de ocurrencias de bookEntry.ASIEN es medio-alto.
Propongo crear una variable representativa de este valor y reemplazar donde toque.
Otro enfoque puede ser que en el if, reemplazar bookEntry.ASIEN porque ya es true
Me parece bien.