bloom-housing / bloom

component-based web framework for affordable housing management
Apache License 2.0
34 stars 24 forks source link

feat: opt out existing lotteries #4267

Closed mcgarrye closed 3 weeks ago

mcgarrye commented 4 weeks ago

This PR addresses #(4258)

Description

Existing lotteries from before the opt in field was added now have null in the field. Thus if a change is made to the lottery on the partners portal, the listing could accidentally be opted in to the system lottery without the user knowing due to our frontend logic. To prevent this, we can run the new script to mark all existing lotteries with null in the opt in field to false.

How Can This Be Tested/Reviewed?

Reseed local database. By default, there should be 2 lottery listings. If you check the db, they will have lotteryOptIn set to null. Login as an admin and go to the API UI. Call the optOutExistingLotteries script endpoint. You should see 2 printed in the console. Check the database to verify the correct listings have been updated.

Author Checklist:

Review Process:

netlify[bot] commented 4 weeks ago

Deploy Preview for bloom-exygy-dev ready!

Name Link
Latest commit aa51c2e40812ee58d6113db013b3f6b1964c2b37
Latest deploy log https://app.netlify.com/sites/bloom-exygy-dev/deploys/66cc902528325b0008cd1d40
Deploy Preview https://deploy-preview-4267--bloom-exygy-dev.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.

netlify[bot] commented 4 weeks ago

Deploy Preview for partners-bloom-dev ready!

Name Link
Latest commit aa51c2e40812ee58d6113db013b3f6b1964c2b37
Latest deploy log https://app.netlify.com/sites/partners-bloom-dev/deploys/66cc9025b7f2b400080442d9
Deploy Preview https://deploy-preview-4267--partners-bloom-dev.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.