Specify max field length

This commit is contained in:
Oliver Walters 2026-05-25 12:30:48 +00:00
parent 725ef0458a
commit c58b7b835b
2 changed files with 7 additions and 2 deletions

View File

@ -66,7 +66,7 @@ class Migration(migrations.Migration):
(
"content",
models.TextField(
blank=True, help_text="Note content", verbose_name="Content"
blank=True, help_text="Note content", verbose_name="Content", max_length=50000
),
),
(

View File

@ -2987,6 +2987,8 @@ class Note(
created: Date/time that the note was created
"""
NOTES_MAX_LENGTH = 50000
class Meta:
"""Meta options for Note model."""
@ -3138,7 +3140,10 @@ class Note(
)
content = models.TextField(
blank=True, verbose_name=_('Content'), help_text=_('Note content')
blank=True,
verbose_name=_('Content'),
help_text=_('Note content'),
max_length=NOTES_MAX_LENGTH,
)