Skip to content

Commit

Permalink
extract variable from with
Browse files Browse the repository at this point in the history
  • Loading branch information
shincap8 committed Oct 30, 2024
1 parent 033b453 commit c2e1428
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/app/infrastructure/repositories/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ def get_model_in_the_loop(self, task_id: int) -> dict:
return models_in_the_loop

def update_light_model(self, id: int, light_model: str) -> None:
light_model = f"{light_model}/model/single_evaluation"
with self.session as session:
instance = session.query(self.model).filter(self.model.id == id).first()
light_model = f"{light_model}/model/single_evaluation"
instance.light_model = light_model
instance.is_in_the_loop = 0
session.flush()
Expand Down

0 comments on commit c2e1428

Please sign in to comment.