Skip to content
Snippets Groups Projects
Commit e5f0b794 authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Useful error message for wrong topic modes

parent b0838e41
No related branches found
No related tags found
No related merge requests found
......@@ -171,7 +171,8 @@ def topic_new():
if event_id is None:
return redirect(url_for(".index"))
form.event_id.data = event_id
return render_layout("admin_topic_new.html", form=form)
event = Event.query.filter_by(id=event_id).first()
return render_layout("admin_topic_new.html", form=form, event=event)
@admin.route("/topic/delete")
@login_required
......
......@@ -3,5 +3,5 @@
{% block title %}Add Topic - Administration{% endblock %}
{% block content %}
{{ render_form(form, action_url=url_for(".topic_new", id=id), action_text="Add", title="Create Topic") }}
{{ render_form(form, action_url=url_for(".topic_new", id=id, event_id=event.id), action_text="Add", title="Create Topic") }}
{% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment