fix sin bankEntity ya no falla
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Javi Gallego 2023-09-13 07:07:22 +02:00
parent e1cc254f82
commit 7bd3bfddc3
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ module.exports = Self => {
const bankEntity = await Self.app.models.BankEntity.findById(this.bankEntityFk);
const filter = {
fields: ['code'],
where: {id: bankEntity.countryFk}
where: {id: bankEntity?.countryFk}
};
const country = await Self.app.models.Country.findOne(filter);