From 05802f4b1e37b5ceed57ae5b1e80aa8b71f6e878 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sat, 27 Aug 2022 10:13:30 +0100 Subject: [PATCH] assert --- src/django_mysql/models/fields/sets.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/django_mysql/models/fields/sets.py b/src/django_mysql/models/fields/sets.py index f442fe044..062129263 100644 --- a/src/django_mysql/models/fields/sets.py +++ b/src/django_mysql/models/fields/sets.py @@ -163,6 +163,7 @@ def check(self, **kwargs: Any) -> list[checks.CheckMessage]: and isinstance(self.base_field, CharField) and self.size ): + assert self.base_field.max_length is not None max_size = ( # The chars used (self.size * (self.base_field.max_length))