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

RealEstateUnit address not set on user creation #1007

Open
BradHN1 opened this issue May 21, 2024 · 1 comment · May be fixed by #1009
Open

RealEstateUnit address not set on user creation #1007

BradHN1 opened this issue May 21, 2024 · 1 comment · May be fixed by #1009
Assignees
Labels
API API bug Something isn't working

Comments

@BradHN1
Copy link
Contributor

BradHN1 commented May 21, 2024

Describe the bug
RealEstateUnit has an address field, which is a foreign key link to a Location.
It also has a redundant "Location" json field which was the original version, perhaps this should have been eliminated.

The code was updated a couple years ago to use the address field to determine which households (RealEstateUnit) were in which zip code, so actions, households and carbon could be properly attributed.

Unfortunately users.create was not updating the address field so new households mostly do not have it.

Two parts to this ticket:

  1. make users.create create the household with the address field properly filled in
  2. backfill the existing RealEstate units to fill in the address from the location field. For this there was a task in misc.py called backfill_real_estate_units; moving this to a Task so it can be invoked from the admin portal like other tasks.
@BradHN1 BradHN1 added bug Something isn't working API API labels May 21, 2024
@BradHN1 BradHN1 self-assigned this May 21, 2024
@BradHN1 BradHN1 moved this to In Progress (Development) in MassEnergize Software May 21, 2024
@BradHN1 BradHN1 moved this from In Progress (Development) to Local Testing (Verification) in MassEnergize Software May 21, 2024
@BradHN1
Copy link
Contributor Author

BradHN1 commented May 22, 2024

Additionally, Community Location values were generally saved as ZIP_CODE_ONLY. The task backfill_data updates those locations with County, State information where appropriate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API API bug Something isn't working
Projects
Status: Local Testing (Verification)
Development

Successfully merging a pull request may close this issue.

1 participant