18F / 2015-foia-hub

A consolidated FOIA request hub.
Other
48 stars 17 forks source link

Using real temp dir for load #771

Closed geramirez closed 9 years ago

geramirez commented 9 years ago

fixing #770

geramirez commented 9 years ago

This update should fix #770. I found two issues that were keeping load_agency_contacts.py from working properly.

  1. temp directory - for some reason we lost the ability to create a folders on the fly after the initial repo load to Cloud Foundry. I had to change load_agency_contacts.py to work the tempfile module.
  2. The pks didn't line up - this line Stats.objects.filter(agency=agency, office=office).delete() deletes items based on pks. When we inserted the new agency, the pks numbers were offset causing anything after the new agency to delete the stats before it; hence the duplicate error.
khandelwal commented 9 years ago

The coveralls tasks are taking really long today. I'm going to merge this in.