Skip to content

Commit

Permalink
pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardusrendy committed Aug 8, 2024
1 parent f751e0c commit 19b33c6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions alab_management/experiment_view/experiment_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ def create_experiment(self, experiment: InputExperiment) -> ObjectId:
for sample in experiment["samples"]:
if sample["sample_id"] is None:
continue # ALabOS will assign a sample id, this is always safe
else:
sample["sample_id"] = ObjectId(sample["sample_id"])
sample["sample_id"] = ObjectId(sample["sample_id"])
if self.sample_view.exists(sample_id=sample["sample_id"]):
raise ValueError(
f"Sample id {sample.sample_id} already exists in the database! Please use another id. This "
Expand All @@ -69,8 +68,7 @@ def create_experiment(self, experiment: InputExperiment) -> ObjectId:
for task in experiment["tasks"]:
if task["task_id"] is None:
continue
else:
task["task_id"] = ObjectId(task["task_id"])
task["task_id"] = ObjectId(task["task_id"])
if self.task_view.exists(task_id=task["task_id"]):
raise ValueError(
f"Task id {task.task_id} already exists in the database! Please use another id. This experiment "
Expand Down

0 comments on commit 19b33c6

Please sign in to comment.