Error when deleting components from the DB

Bug #1272432 reported by Milo Casagrande
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linaro-status
Fix Released
High
Milo Casagrande

Bug Description

When trying to delete a component from the database via the admin interface, I was faced with a server error 500 page.
Digging a little bit into the code, looks like the component I was trying to delete didn't have any projects, or at least the associated Project object was None.

Milo Casagrande (milo)
Changed in linaro-status:
assignee: nobody → Milo Casagrande (milo)
importance: Undecided → High
status: New → In Progress
Revision history for this message
Milosz Wasilewski (mwasilew) wrote :

I just checked and this is a problem for all components. Attaching patch, that should fix it (at least until better solution is available)

Revision history for this message
Milo Casagrande (milo) wrote :

Milosz, patch looks good and is what I did locally on Friday, but didn't push anything in the repository.
The "problem" is that those fields in the model can be None, since they are set as Null=true, so we need to protect against that case in all the models.

Revision history for this message
Milo Casagrande (milo) wrote :

Patch pushed to master, and applied to production and staging. Manually applied, since to deploy status/roadmap we need to take the service down for maintenance a little bit more and do it correctly with ansible.

Changed in linaro-status:
status: In Progress → Fix Released
Revision history for this message
Milosz Wasilewski (mwasilew) wrote :

The problem here is that the burndown snapshot can be 'attached' either to project (global) or component (project). So we have to live with the blank=True in model definition or create separate models for each snapshot type.

Milo Casagrande (milo)
Changed in linaro-status:
milestone: none → 2014.02
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.