mirror of
http://git.carcosa.net/jmcbray/brutaldon.git
synced 2025-02-04 22:12:57 -05:00
Fix crash in template rendering of self-replies
This commit is contained in:
parent
3d21ed212e
commit
f75f969522
@ -62,7 +62,7 @@ class PostForm(forms.Form):
|
||||
status = cleaned_data.get("status")
|
||||
spoiler_text = cleaned_data.get("spoiler_text")
|
||||
|
||||
if len(status) + len(spoiler_text) > MAX_LENGTH:
|
||||
if (status and spoiler_text and len(status) + len(spoiler_text) > MAX_LENGTH):
|
||||
raise forms.ValidationError("Max length of toot exceeded: %(max_length)s",
|
||||
code="too_long",
|
||||
params={"max_length": MAX_LENGTH})
|
||||
|
Loading…
x
Reference in New Issue
Block a user