Skip to content
Snippets Groups Projects
Commit 3bebd597 authored by Simon Künzel's avatar Simon Künzel
Browse files

Fix small bugs

parent 99982a28
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,7 @@ api_register_non_stored_object("video_slide_row", jnode.video_slide_jnode.VideoS
("entries_per_page", "?int", "Must be between 10 and 100"),
("page", "?int", "Zero-indexed. Must not be negative. If this is bigger than the page count, an empty "
"page is returned"),
("include_sorted", "boolean", f"Default is false"),
("include_sorted", "?boolean", f"Default is false"),
],
response_objects=[
("page_count", "int"),
......@@ -38,6 +38,7 @@ def api_route_get_sorter_files():
def _trans(session: SessionDb):
query = SorterFile.select(api_user_ac(), [
SorterFile.designated_medium_file,
SorterFile.lecture,
Lecture.course,
])
......@@ -64,6 +65,7 @@ def api_route_get_sorter_files():
is_mod=True,
course_context=course_context,
lecture_context=lecture_context,
medium_file_context=NoSerializationContext(),
include_lectures=False,
include_chapters=False,
include_media=False,
......
......@@ -60,6 +60,7 @@ def _check_file(
file = files_in_sorter_dir[db_path]
if status == SorterFileStatus.SORTING_UPCOMING and file.status == SorterFileStatus.ERROR:
status = SorterFileStatus.ERROR
error_message = file.sorter_error_message
else:
file = SorterFile(
file_path=db_path,
......
......@@ -197,7 +197,7 @@ class JobController:
if is_success is None:
# Not finished yet
return
if job.run_start_time is None:
if is_success and job.run_start_time is None:
raise ValueError(f"Job has finished successfully but start time is missing")
failed = not is_success
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment