From ef2d7c2340ef4690975fc4a02a5131b06701f23d Mon Sep 17 00:00:00 2001 From: jhynsoo Date: Tue, 14 Nov 2023 00:44:26 +0900 Subject: [PATCH] fix: Make ItemIssues nullable to prevent default value error --- market/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/market/models.py b/market/models.py index a3fd084..3e88c67 100644 --- a/market/models.py +++ b/market/models.py @@ -48,7 +48,7 @@ class Post(models.Model): User, on_delete=models.SET_NULL, null=True, related_name="posts" ) item_issues = models.OneToOneField( - ItemIssues, on_delete=models.CASCADE, related_name="post" + ItemIssues, on_delete=models.CASCADE, null=True, related_name="post" ) done = models.BooleanField(default=False) written_at = models.DateTimeField(auto_now_add=True)