WING-NUS / SSID

Student Submission Integrity Diagnosis
18 stars 23 forks source link

fix database deletion bug #357

Closed huyuxin0429 closed 1 year ago

huyuxin0429 commented 1 year ago

Description

fix database deletion bug #347 with api key

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

Checklist:

sibinhho99 commented 1 year ago

Does this fix the delete cascade issue in general (i.e. if I delete the user the corresponding API key is deleted as well, if I delete an assignment its submission similarities would be deleted as well), or it just changes the order of deletion for this specific test?

huyuxin0429 commented 1 year ago

Does this fix the delete cascade issue in general (i.e. if I delete the user the corresponding API key is deleted as well, if I delete an assignment its submission similarities would be deleted as well), or it just changes the order of deletion for this specific test?

This fixes the root dependency between api keys and assignment. When an assignment is deleted, all api keys assigned to that account are also deleted. The tests are updated to reflect this relation.

sibinhho99 commented 1 year ago

Does this fix the delete cascade issue in general (i.e. if I delete the user the corresponding API key is deleted as well, if I delete an assignment its submission similarities would be deleted as well), or it just changes the order of deletion for this specific test?

This fixes the root dependency between api keys and assignment. When an assignment is deleted, all api keys assigned to that account are also deleted. The tests are updated to reflect this relation.

You mean between api keys and users, and when an user is deleted? Looks like it's still not working for me locally

image