Revision 40c5441d
Von Sven Schöling vor etwa 9 Jahren hinzugefügt
SL/PriceSource/Makemodel.pm | ||
---|---|---|
30 | 30 |
|
31 | 31 |
my $makemodel = SL::DB::Manager::MakeModel->find_by(id => $spec); |
32 | 32 |
|
33 |
# TODO: if someone deletes the prices entry, this fails. add a fallback |
|
33 |
return SL::PriceSource::Price->new( |
|
34 |
price_source => $self, |
|
35 |
missing => t8('This makemodel price does not exist anymore'), |
|
36 |
) if !$makemodel; |
|
37 |
|
|
34 | 38 |
return $self->make_price_from_makemodel($makemodel); |
35 | 39 |
|
36 | 40 |
} |
... | ... | |
57 | 61 |
); |
58 | 62 |
} |
59 | 63 |
|
60 |
|
|
61 | 64 |
1; |
Auch abrufbar als: Unified diff
Preisquellen: Fehlerbehandlung in MakeModel