diff --git a/codeGrader/backend/db/ExecutionResult.py b/codeGrader/backend/db/ExecutionResult.py index 0b036de..455763b 100644 --- a/codeGrader/backend/db/ExecutionResult.py +++ b/codeGrader/backend/db/ExecutionResult.py @@ -74,7 +74,7 @@ class ExecutionResult(Base): testcase_id = Column( Integer, - ForeignKey(TestCase.id, onupdate="CASCADE"), + ForeignKey(TestCase.id, ondelete="SET NULL", onupdate="CASCADE"), nullable=True, index=True )