Open srisainachuri opened 2 years ago
Seems to be SET_NULL on delete rather than CASCADE: https://github.com/bmun/huxley/blob/fcfdf2e40653eb5a0280eb8714b93f10d9b5b43c/huxley/core/models.py#L500-L501
PositionPaper objects are left in the table with the Assignment field as NULL. Most likely this is resulting in an error when calling PositionPaper.__str__
There is currently a one-to-one relationship between Assignment and PositionPaper objects such that when Assignments are deleted, the corresponding PositionPaper objects get deleted. In manual testing there does not seem to be an issue with this, but during live registration, the database occasionally becomes populated with PositionPaper objects with no corresponding Assignment object, causing the server to error when viewing Assignments in Admin view. Further investigation will be needed to figure out the root cause of this bug.