diff --git a/chapters.py b/chapters.py index 5eb22d3aa515ddc886b51b027cba1611bed8e419..24d04d4d04f808ce2324f8bb8003adc81ad8e4b2 100644 --- a/chapters.py +++ b/chapters.py @@ -11,7 +11,10 @@ def suggest_chapter(lectureid): time= timedelta(hours=x.hour,minutes=x.minute,seconds=x.second).total_seconds() time = int(time) except ValueError: - flash('Falsches Zeitformat, "%H:%M:%S" wird erwartet. Z.B. "01:39:42" für eine Kapitel bei Stunde 1, Minute 39, Sekunde 42') + if 'ref' in request.values: + flash('Falsches Zeitformat, "%H:%M:%S" wird erwartet. Z.B. "01:39:42" für eine Kapitel bei Stunde 1, Minute 39, Sekunde 42') + return redirect(request.values['ref']) + return 'Wrong time format, "%H:%M:%S" is expected', 400 submitter = None if not ismod():