diff --git a/apiserver/plane/db/models/api_token.py b/apiserver/plane/db/models/api_token.py index 1b0dda55e..b4009e6eb 100644 --- a/apiserver/plane/db/models/api_token.py +++ b/apiserver/plane/db/models/api_token.py @@ -28,7 +28,7 @@ class APIToken(BaseModel): choices=((0, "Human"), (1, "Bot")), default=0 ) workspace = models.ForeignKey( - "db.workspace", related_name="api_tokens", on_delete=models.SET_NULL, null=True + "db.Workspace", related_name="api_tokens", on_delete=models.CASCADE, null=True ) class Meta: