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

Bug: Cascading to CaseSample table not set up #4023

Open
2 tasks
islean opened this issue Dec 13, 2024 · 0 comments
Open
2 tasks

Bug: Cascading to CaseSample table not set up #4023

islean opened this issue Dec 13, 2024 · 0 comments
Labels

Comments

@islean
Copy link
Contributor

islean commented Dec 13, 2024

Describe the bug

When deleting cases, there is no cascading nor constraints set up towards CaseSample, meaning that we get malformed entries with case_id = None. My understanding is that these should be deleted. IMPORTANT NOTE: the related sample entries should be left in place, only the CaseSample entries should get deleted.

Similarly, when deleting a sample, we have constraint in the CaseSample table preventing the sample_id from being set to None. So that sample is blocked from being deleted, whereas it probably should be deleted and its CaseSample entries should be removed as well.

To Reproduce

Have a case linked to a sample.

Delete the case.

Check the CaseSample entry

Acceptance criteria

  • Deleting a case removes the case and any CaseSample entries with matching case_id
  • Deleting a sample removes the sample and any Sample entries with matching sample_id

Questions

Should mother/father be cleared?

@islean islean added the Bug label Dec 13, 2024
@islean islean changed the title Bug: Deleted cases do not cascade to the CaseSample table Bug: Cascading to CaseSample table not set up Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant