Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 04479c02

Von Jan Büren vor etwa 6 Jahren hinzugefügt

  • ID 04479c02711b7b49ffc6f2228615aed373b83a01
  • Vorgänger 39218cc1
  • Nachfolger b9436847

disable_one_time_config: Transaktionssicher

Unterschiede anzeigen:

SL/DB/PeriodicInvoicesConfig.pm
140 140
  # A periodicity of one time was set. Deactivate this config now.
141 141
  if ($self->periodicity eq 'o') {
142 142
    _log_msg("setting inactive\n");
143
    $self->active(0);
144
    $self->order->update_attributes(closed => 1);
145
    $self->save;
143
    if (!$self->db->with_transaction(sub {
144
      1;                          # make Emacs happy
145
      $self->active(0);
146
      $self->order->update_attributes(closed => 1);
147
      die;
148
      $self->save;
149
      1;
150
    })) {
151
      $::lxdebug->message(LXDebug->WARN(), "disalbe_one_time config failed: " . join("\n", (split(/\n/, $self->{db_obj}->db->error))[0..2]));
152
      return undef;
153
    }
146 154
    return $self->order->ordnumber;
147 155
  }
148 156
  return undef;

Auch abrufbar als: Unified diff