Skip to content

Commit

Permalink
fix(server): fix precision and vacancy reason comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
Falinor committed Jan 24, 2025
1 parent 61fea15 commit 07b9ccf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/src/controllers/housingController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -528,12 +528,12 @@ async function createHousingUpdateEvents(
(housingApi.status !== statusUpdate.status ||
housingApi.subStatus !== statusUpdate.subStatus ||
!_.isEqual(
housingApi.precisions ?? null,
statusUpdate.precisions ?? null
housingApi.precisions?.length ? housingApi.precisions : null,
statusUpdate.precisions?.length ? statusUpdate.precisions : null
) ||
!_.isEqual(
housingApi.vacancyReasons ?? null,
statusUpdate.vacancyReasons ?? null
housingApi.vacancyReasons?.length ? housingApi.vacancyReasons : null,
statusUpdate.vacancyReasons?.length ? statusUpdate.vacancyReasons : null
))
) {
await eventRepository.insertHousingEvent({
Expand Down

0 comments on commit 07b9ccf

Please sign in to comment.