Commit 37475dc6 authored by Hinrikus Wolf's avatar Hinrikus Wolf

utils: correct smaller bugs

parent dc69aedd
......@@ -12,7 +12,7 @@ def render_layout(template, **kwargs):
def speaker_by_name_or_number(name_or_number, event_id):
if name_or_number.isnumeric():
number = int(name_or_number)
speaker = Speaker.query.filter_by(number=number).first()
speaker = Speaker.query.filter_by(number=number, event_id=event_id).first()
if speaker is not None:
return speaker
else:
......@@ -22,7 +22,7 @@ def speaker_by_name_or_number(name_or_number, event_id):
return speaker
else:
name = name_or_number
speaker = Speaker.query.filter_by(name=name).first()
speaker = Speaker.query.filter_by(name=name, event_id=event_id).first()
if speaker is not None:
return speaker
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment