fix: description and comment_json default value to remove warnings

This commit is contained in:
pablohashescobar 2023-02-07 02:29:36 +05:30
parent f308fe2ce1
commit 32d83ac2c9

View File

@ -33,7 +33,7 @@ class Issue(ProjectBaseModel):
related_name="state_issue", related_name="state_issue",
) )
name = models.CharField(max_length=255, verbose_name="Issue Name") name = models.CharField(max_length=255, verbose_name="Issue Name")
description = models.JSONField(blank=True, default="") description = models.JSONField(blank=True, default=dict)
description_html = models.TextField(blank=True, default="<p></p>") description_html = models.TextField(blank=True, default="<p></p>")
description_stripped = models.TextField(blank=True, null=True) description_stripped = models.TextField(blank=True, null=True)
priority = models.CharField( priority = models.CharField(
@ -198,7 +198,7 @@ class TimelineIssue(ProjectBaseModel):
class IssueComment(ProjectBaseModel): class IssueComment(ProjectBaseModel):
comment_stripped = models.TextField(verbose_name="Comment", blank=True) comment_stripped = models.TextField(verbose_name="Comment", blank=True)
comment_json = models.JSONField(blank=True, default="") comment_json = models.JSONField(blank=True, default=dict)
comment_html = models.TextField(blank=True, default="<p></p>") comment_html = models.TextField(blank=True, default="<p></p>")
attachments = ArrayField(models.URLField(), size=10, blank=True, default=list) attachments = ArrayField(models.URLField(), size=10, blank=True, default=list)
issue = models.ForeignKey(Issue, on_delete=models.CASCADE) issue = models.ForeignKey(Issue, on_delete=models.CASCADE)