Octopus: fix tariff payment method API presumption (#21114)
This commit is contained in:
parent
eb62197744
commit
856cc6145d
1 changed files with 5 additions and 1 deletions
|
|
@ -129,7 +129,11 @@ func (t *Octopus) run(done chan error) {
|
|||
|
||||
data := make(api.Rates, 0, len(res.Results))
|
||||
for _, r := range res.Results {
|
||||
if t.paymentMethod != "" && r.PaymentMethod != t.paymentMethod {
|
||||
// This checks whether:
|
||||
// - a Payment Method is set on the Result
|
||||
// - a Payment Method filter is set
|
||||
// - the Payment Method in the Result matches the Payment Method filter
|
||||
if r.PaymentMethod != "" && t.paymentMethod != "" && r.PaymentMethod != t.paymentMethod {
|
||||
// A Payment Method filter is set, and this Tariff entry does not match our filter.
|
||||
continue
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue