Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: null checks in minMax process (#4632) #837

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ColinBuyck
Copy link
Collaborator

This PR addresses bloom-housing#4631

  • Addresses the issue in full
  • Addresses only certain aspects of the issue

Description

The units summarization process was failing to handle multiple units without rent information. The first unit was correctly handled with "t.n/a" in the getDefaultSummary function but then from there the inputs to a minMax function were t.n/a and null leading to the NaN. This fix avoids the minMax comparison if the unit's associated field is null.

How Can This Be Tested/Reviewed?

Add multiple units of the same unit type to a listing that have no rent or rent as a percentage of income information. Ensure that the unit summary displays with n/a rather than NaN per month.

Author Checklist:

  • Added QA notes to the issue with applicable URLs
  • Reviewed in a desktop view
  • Reviewed in a mobile view
  • Reviewed considering accessibility
  • Added tests covering the changes
  • Made corresponding changes to the documentation
  • Ran yarn generate:client and/or created a migration when required

Review Process:

  • Read and understand the issue
  • Ensure the author has added QA notes
  • Review the code itself from a style point of view
  • Pull the changes down locally and test that the acceptance criteria is met
  • Either (1) explicitly ask a clarifying question, (2) request changes, or (3) approve the PR, even if there are very small remaining changes, if you don't need to re-review after the updates

@ColinBuyck ColinBuyck added 1 review needed release A PR that is pulling over a commit(s) from core labels Feb 6, 2025
Copy link

netlify bot commented Feb 6, 2025

Deploy Preview for housing-sanjoseca-gov ready!

Name Link
🔨 Latest commit b0e6bc8
🔍 Latest deploy log https://app.netlify.com/sites/housing-sanjoseca-gov/deploys/67a500e20dce2b0008d195df
😎 Deploy Preview https://deploy-preview-837--housing-sanjoseca-gov.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 review needed release A PR that is pulling over a commit(s) from core
Development

Successfully merging this pull request may close these issues.

1 participant