refactor: update model association to cascade on delete
This commit is contained in:
parent
f69b76c77d
commit
cd41a05022
1 changed files with 1 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue