Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/backfill-costs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async function backfill() {
console.log(`Found ${motos.length} motorcycles.`);

for (const moto of motos) {
if (moto.purchasePrice) {
if (moto.purchasePrice != null) {
const factor = getFactor(moto.currencyCode);
const normalizedPrice = moto.purchasePrice * factor;

Expand All @@ -38,7 +38,7 @@ async function backfill() {
console.log(`Found ${records.length} maintenance records.`);

for (const record of records) {
if (record.cost) {
if (record.cost != null) {
const factor = getFactor(record.currency);
const normalizedCost = record.cost * factor;

Expand Down