You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue
There is a potential for database integrity error when deleting subjects. because of the Django upgrade Django will no longer allow cascading delete on many to many fields. So when a subject is deleted, they could also be referenced in the subject group table.
Permanent Fix
There is a many to many relationship between Subject group and Subjects, here is the model. we need to create a through table and specify to cascade delete. How to create Django through tables can be found here
Temporary process to delete subjects
Get the following information
Ehb subject primary key
Ehb Protocol subject group primary key
NOTE: not the BRP protocol ID
Get the unique Group name for subject in the protocol