Skip to content

Commit

Permalink
Add on_delete to user ForeignKey
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantinos Bairaktaris committed Jun 15, 2022
1 parent 81f15ba commit 2bbfbef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion chunked_upload/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ class ChunkedUpload(BaseChunkedUpload):
To use it, set CHUNKED_UPLOAD_ABSTRACT_MODEL as True in your settings.
"""

user = models.ForeignKey(AUTH_USER_MODEL, related_name='chunked_uploads')
user = models.ForeignKey(
AUTH_USER_MODEL,
related_name='chunked_uploads',
on_delete=models.CASCADE,
)

class Meta:
abstract = ABSTRACT_MODEL

0 comments on commit 2bbfbef

Please sign in to comment.