Uses correct model field for raw values

This commit is contained in:
Mouse Reeve 2021-10-15 10:36:46 -07:00
parent 61a0b50b91
commit bd0e4abd56
2 changed files with 6 additions and 7 deletions
bookwyrm

View file

@ -1,7 +1,6 @@
# Generated by Django 3.2.5 on 2021-10-15 01:28
# Generated by Django 3.2.5 on 2021-10-15 17:34
import bookwyrm.models.fields
from django.db import migrations
from django.db import migrations, models
class Migration(migrations.Migration):
@ -14,11 +13,11 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name="quotation",
name="raw_quote",
field=bookwyrm.models.fields.HtmlField(blank=True, null=True),
field=models.TextField(blank=True, null=True),
),
migrations.AddField(
model_name="status",
name="raw_content",
field=bookwyrm.models.fields.HtmlField(blank=True, null=True),
field=models.TextField(blank=True, null=True),
),
]

View file

@ -31,7 +31,7 @@ class Status(OrderedCollectionPageMixin, BookWyrmModel):
"User", on_delete=models.PROTECT, activitypub_field="attributedTo"
)
content = fields.HtmlField(blank=True, null=True)
raw_content = fields.HtmlField(blank=True, null=True)
raw_content = models.TextField(blank=True, null=True)
mention_users = fields.TagField("User", related_name="mention_user")
mention_books = fields.TagField("Edition", related_name="mention_book")
local = models.BooleanField(default=True)
@ -296,7 +296,7 @@ class Quotation(BookStatus):
"""like a review but without a rating and transient"""
quote = fields.HtmlField()
raw_quote = fields.HtmlField(blank=True, null=True)
raw_quote = models.TextField(blank=True, null=True)
position = models.IntegerField(
validators=[MinValueValidator(0)], null=True, blank=True
)