Skip to content

Commit

Permalink
Fix db.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
aelassas committed Nov 16, 2024
1 parent 4c41d94 commit d00248e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/scripts/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ if (
const cars = await Car.find({})

for (const car of cars) {
if (car.price) {
car.dailyPrice = car.price
if (('price' in car) && car.price) {
car.dailyPrice = Number(car.price)
car.discountedDailyPrice = null
car.biWeeklyPrice = null
car.discountedBiWeeklyPrice = null
Expand Down

0 comments on commit d00248e

Please sign in to comment.