Skip to content

Commit

Permalink
Merge pull request #162 from Viva-con-Agua/bugfix/no_deposits
Browse files Browse the repository at this point in the history
list can be empty or nil
  • Loading branch information
TobiKaestle authored Dec 22, 2023
2 parents b153fd5 + 42609c7 commit 9ac15b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/deposit.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ func (i *DepositUpdate) DepositDatabase(current *Deposit) (r *DepositUpdate, cre
}
}
currency := "EUR"
if i.DepositUnit != nil {
if i.DepositUnit != nil && len(i.DepositUnit) != 0 {
currency = i.DepositUnit[0].Money.Currency
}
r = i
Expand Down

0 comments on commit 9ac15b2

Please sign in to comment.