diff --git a/jobs/tasks/lecture/classify_video.py b/jobs/tasks/lecture/classify_video.py index 9a09b355..5003a463 100644 --- a/jobs/tasks/lecture/classify_video.py +++ b/jobs/tasks/lecture/classify_video.py @@ -103,6 +103,7 @@ def job(lecture_id: str, language: str): logger.info(f'response from openAI: {response}') + lecture.refresh() lecture.approved = category_is_ok lecture.save() diff --git a/jobs/tasks/lecture/create_description.py b/jobs/tasks/lecture/create_description.py index 258cf300..e53522da 100644 --- a/jobs/tasks/lecture/create_description.py +++ b/jobs/tasks/lecture/create_description.py @@ -37,6 +37,7 @@ def job(lecture_id: str, language: str): analysis_id=analysis.id, ) + lecture.refresh() lecture.description = response lecture.save() diff --git a/jobs/tasks/lecture/fetch_metadata.py b/jobs/tasks/lecture/fetch_metadata.py index 71a7c7d0..83514c28 100644 --- a/jobs/tasks/lecture/fetch_metadata.py +++ b/jobs/tasks/lecture/fetch_metadata.py @@ -37,6 +37,7 @@ def job(lecture_id: str, language: str): else: raise ValueError(f'unknown source {lecture.source}') + lecture.refresh() lecture.title = title lecture.date = date lecture.group = group