From fd4588f603571d244577c57f513ba0a7d69be242 Mon Sep 17 00:00:00 2001 From: Hepheir Date: Wed, 4 Sep 2024 20:54:43 +0900 Subject: [PATCH] =?UTF-8?q?fix(apps.problems.analyzers):=20=EC=97=86?= =?UTF-8?q?=EB=8A=94=20=EB=A9=94=EC=86=8C=EB=93=9C=20=EC=B0=B8=EC=A1=B0=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95:=20`from=5Fmodels()`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/apps/problems/analyzers/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/apps/problems/analyzers/__init__.py b/app/apps/problems/analyzers/__init__.py index d0379de..5123908 100644 --- a/app/apps/problems/analyzers/__init__.py +++ b/app/apps/problems/analyzers/__init__.py @@ -29,8 +29,8 @@ def auto_analyze(sender, instance: Problem, created: bool, **kwargs): @tasks.background def schedule_analyze(problem_id: int): logger.info(f'PK={problem_id} 문제의 분석 준비중.') - problem = Problem.objects.get(pk=problem_id) - problem_dto = ProblemDTO.from_model(problem) + problem: Problem = Problem.objects.get(pk=problem_id) + problem_dto = problem.as_dto() logger.info('문제 분석기를 불러오는 중.') analyzer = get_analyzer() logger.info(f'{problem_dto} 문제의 분석 시작.')