Skip to content

Commit

Permalink
Merge pull request #355 from RJ-SMTR/feat/job-transacao-view
Browse files Browse the repository at this point in the history
(prod) fix: dont update
  • Loading branch information
williamfl2007 committed Jul 24, 2024
2 parents fd5d79a + 73192c5 commit 910bc05
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/transacao-bq/transacao-view.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,7 @@ export class TransacaoViewService {
const existing = existings.filter(
(i) => i.idTransacao === transacao.idTransacao,
)[0] as TransacaoView | undefined;
// Se existe, atualiza
if (existing) {
this.logger.debug(
`Atualizando item ${existing.id} - ${transacoesIndex}/${transacoes.length}`,
);
await queryRunner.manager.save(TransacaoView, {
id: existing.id,
...transacao,
});
}
// Senão, cria
else {
if (!existing){
this.logger.debug(
`Inserindo novo item - ${transacoesIndex}/${transacoes.length}`,
);
Expand Down

0 comments on commit 910bc05

Please sign in to comment.