chore: refs #7323 refactor autofillbic

This commit is contained in:
Jorge Penadés 2024-08-26 13:42:08 +02:00
parent 6f9cd7fe15
commit c47635fcf2
1 changed files with 1 additions and 3 deletions

View File

@ -132,9 +132,7 @@ async function autofillBic(worker) {
let filter = { where: { id: bankEntityId } }; let filter = { where: { id: bankEntityId } };
const { data } = await axios.get(`BankEntities`, { params: { filter } }); const { data } = await axios.get(`BankEntities`, { params: { filter } });
const hasData = data && data[0]; worker.bankEntityFk = data?.[0]?.id ?? undefined;
if (hasData) worker.bankEntityFk = data[0].id;
else if (!hasData) worker.bankEntityFk = undefined;
} }
</script> </script>
<template> <template>