fix empty tag bug

This commit is contained in:
doubaniux 2020-07-10 22:49:08 +08:00
parent 0aa7bd35ad
commit 19d66c3fef

View file

@ -107,4 +107,6 @@ class TagField(forms.CharField):
widget = TagInput
def to_python(self, value):
value = super().to_python(value)
if not value:
return
return [t.strip() for t in value.split(',')]