Skip to content

Commit

Permalink
Merge pull request #8620 from ehuelsmann/adr/persister-concerns
Browse files Browse the repository at this point in the history
Follow-up to #8566: adjust persister concerns
  • Loading branch information
ehuelsmann authored Jan 25, 2025
2 parents 3ede342 + d707bf8 commit a908c76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/LedgerSMB/Workflow/Action/TransactionApprove.pm
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ Implements the C<Workflow::Action> protocol.
my $query = <<~'SQL';
select draft_approve(id)
from transactions
where id = ? and not approved
where workflow_id = ? and not approved
SQL

sub execute( $self, $wf ) {
$self->SUPER::execute($wf);

my $dbh = $wf->handle;
$dbh->do($query, {}, $wf->context->param('id'))
$dbh->do($query, {}, $wf->id)
or die $dbh->errstr;

return;
Expand Down
4 changes: 2 additions & 2 deletions lib/LedgerSMB/Workflow/Action/TransactionDelete.pm
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ Implements the C<Workflow::Action> protocol.
my $query = <<~'SQL';
select draft_delete(id)
from transactions
where id = ?
where workflow_id = ?
SQL

sub execute( $self, $wf ) {
$self->SUPER::execute($wf);

my $dbh = $wf->handle;
$dbh->do($query, {}, $wf->context->param('id'))
$dbh->do($query, {}, $wf->id)
or die $dbh->errstr;

return;
Expand Down

0 comments on commit a908c76

Please sign in to comment.