Skip to content

Commit

Permalink
chore: simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Dec 27, 2024
1 parent d7619b5 commit c09572d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tariff/tariff.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,12 @@ func (t *Tariff) Rates() (api.Rates, error) {

// Type implements the api.Tariff interface
func (t *Tariff) Type() api.TariffType {
if t.typ != 0 {
switch {
case t.typ != 0:
return t.typ
}
if t.priceG != nil {
case t.priceG != nil:
return api.TariffTypePriceDynamic
default:
return api.TariffTypePriceForecast
}
return api.TariffTypePriceForecast
}

0 comments on commit c09572d

Please sign in to comment.