Closed maurizi closed 5 years ago
I investigated this, and deleted both Dallas
locations (as they had no organizations attached to them) and one of the Boston
locations.
My initial assumption was that this was possible by accidentally double-clicking the next button on the "Create Organization" wizard, which I verified to be possible with my own testing, and I opened an issue to address that (https://github.com/azavea/temperate/issues/1208). However, given that the Dallas locations had no organizations associated with them, it seems like it must be possible to get into this state via other means as well.
When attempting to add a Dallas city in production, we ran into an error in trying to call
get_or_create(...)
that there were 2 already existingPlanItLocation
objects for Dallas (see https://rollbar.com/Azavea/ClimateChange/items/157/)We should investigate how this occurred, prevent it from happening in the future, and write a clean-up to remove any duplicates that currently exist.