Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PositionPaper objects with no Assignment #805

Open
srisainachuri opened this issue Mar 1, 2022 · 1 comment
Open

PositionPaper objects with no Assignment #805

srisainachuri opened this issue Mar 1, 2022 · 1 comment
Assignees

Comments

@srisainachuri
Copy link
Contributor

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.

@erwang01
Copy link
Member

Seems to be SET_NULL on delete rather than CASCADE:

paper = models.OneToOneField(
PositionPaper, on_delete=models.SET_NULL, blank=True, null=True)

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__

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants