(raw: str)
| 18709 | if str(ve) == "forbidden_type": |
| 18710 | msg = _("Forbidden file type.") |
| 18711 | if is_ajax: |
| 18712 | return jsonify(ok=False, error=msg), 400 |
| 18713 | flash(msg) |
| 18714 | return redirect(url_for("discussion")) |
| 18715 | |
| 18716 | has_voice = bool(voice and getattr(voice, "filename", "")) |
| 18717 | has_file = bool(chosen_file and getattr(chosen_file, "filename", "")) |
| 18718 | has_gif_url = bool(gif_url) |
| 18719 | |
| 18720 | if (not body) and (not has_voice) and (not has_file) and (not has_gif_url): |