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:
make users.create create the household with the address field properly filled in
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.
Additionally, Community Location values were generally saved as ZIP_CODE_ONLY. The task backfill_data updates those locations with County, State information where appropriate
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: