From bd20ef04cc4de16af66befb3c0f09997a2da7de4 Mon Sep 17 00:00:00 2001 From: Johnson Thiang Date: Thu, 22 Dec 2022 18:10:13 +0800 Subject: [PATCH 1/2] change field type to db.text --- core/admin/mailu/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/admin/mailu/models.py b/core/admin/mailu/models.py index a7d0d006..9b308b32 100644 --- a/core/admin/mailu/models.py +++ b/core/admin/mailu/models.py @@ -75,7 +75,7 @@ class CommaSeparatedList(db.TypeDecorator): """ Stores a list as a comma-separated string, compatible with Postfix. """ - impl = db.String + impl = db.Text cache_ok = True python_type = list @@ -96,7 +96,7 @@ class JSONEncoded(db.TypeDecorator): """ Represents an immutable structure as a json-encoded string. """ - impl = db.String + impl = db.Text cache_ok = True python_type = str From ca44ccbe1cb05bb6cb7b208104210c2a21c4aea7 Mon Sep 17 00:00:00 2001 From: Florent Daigniere Date: Thu, 29 Dec 2022 17:02:05 +0100 Subject: [PATCH 2/2] Use the size other implementations default to --- core/admin/mailu/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/admin/mailu/models.py b/core/admin/mailu/models.py index 9b308b32..f9fabb7f 100644 --- a/core/admin/mailu/models.py +++ b/core/admin/mailu/models.py @@ -75,7 +75,7 @@ class CommaSeparatedList(db.TypeDecorator): """ Stores a list as a comma-separated string, compatible with Postfix. """ - impl = db.Text + impl = db.String(255) cache_ok = True python_type = list @@ -96,7 +96,7 @@ class JSONEncoded(db.TypeDecorator): """ Represents an immutable structure as a json-encoded string. """ - impl = db.Text + impl = db.String(255) cache_ok = True python_type = str