Bugfix/filter currencies with null value (#579)

* Filter currencies with null value

* Update changelog
This commit is contained in:
Thomas Kaul 2021-12-25 17:08:56 +01:00 committed by GitHub
parent c7f4825499
commit bbc4e64cb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 3 deletions

View File

@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased
### Fixed
- Filtered potential `null` currencies
## 1.94.0 - 25.12.2021
### Added

View File

@ -157,7 +157,12 @@ export class ExchangeRateDataService {
await this.prismaService.account.findMany({
distinct: ['currency'],
orderBy: [{ currency: 'asc' }],
select: { currency: true }
select: { currency: true },
where: {
currency: {
not: null
}
}
})
).forEach((account) => {
currencies.push(account.currency);
@ -167,7 +172,12 @@ export class ExchangeRateDataService {
await this.prismaService.settings.findMany({
distinct: ['currency'],
orderBy: [{ currency: 'asc' }],
select: { currency: true }
select: { currency: true },
where: {
currency: {
not: null
}
}
})
).forEach((userSettings) => {
currencies.push(userSettings.currency);
@ -177,7 +187,12 @@ export class ExchangeRateDataService {
await this.prismaService.symbolProfile.findMany({
distinct: ['currency'],
orderBy: [{ currency: 'asc' }],
select: { currency: true }
select: { currency: true },
where: {
currency: {
not: null
}
}
})
).forEach((symbolProfile) => {
currencies.push(symbolProfile.currency);