opencivicdata / python-opencivicdata

python utilities for Open Civic Data
BSD 3-Clause "New" or "Revised" License
34 stars 28 forks source link

Change on_delete action for several FK fields #111

Closed gordonje closed 7 years ago

gordonje commented 7 years ago

@jamesturk Sorry for not responding earlier when you were going through this. I finally got around to talking a look myself, and I've got a few changes to propose WRT the on_delete actions.

In sum:

  1. When a contest with a runoff is deleted, don't automatically delete the runoff.
  2. When a candidacy at the top of the ticket (e.g., president) is deleted, don't automatically delete the running mate candidacies (e.g., vice president).
  3. Protect divisions from being deleted when they are linked to any contests (similar to what we are doing with elections).
  4. Protect posts from being deleted when they are linked to any candidacies.

Let me know if any of that warrants further discussion.

Thanks.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 98.999% when pulling 15fff0811ef1651aeb40d0109fa89a1cb965b0a7 on california-civic-data-coalition:FKon_delete into b8d601cd13aac9310d40be132c166654595dd996 on opencivicdata:master.

jamesturk commented 7 years ago

seems sane to me & whatever works best for you all is fine IMO