From 9994b9f2e96d2fc8ac491a7d4b137875dff72766 Mon Sep 17 00:00:00 2001 From: Michael Kaiser Date: Thu, 14 Mar 2024 19:28:39 +0100 Subject: [PATCH] changing relation ship for testcase executionresult to fix problem where testcases could not have been deleted --- codeGrader/backend/db/ExecutionResult.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 )