Skip to content

Commit

Permalink
Update datahandling.py
Browse files Browse the repository at this point in the history
fix for #70 and created #71 to handle follow up
  • Loading branch information
kimleeng authored Sep 17, 2020
1 parent ed50ce7 commit 3515730
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/bifrostlib/bifrostlib/datahandling.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,11 +373,12 @@ def check_requirements(self, output_file="requirements_met", log=None):
expected_value = requirements[requirement]
if not self.requirement_met(self.sample_db, field, expected_value, log):
no_failures = False
elif category == "component":
field = requirement.split(".")[2:]
expected_value = requirements[requirement]
s_c_db = get_sample_component(sample_id=self.sample_id,
component_id=self.component_id)
elif category == "component":
component_to_check = requirement.split(".")[1]
field = requirement.split(".")[2:]
expected_value = requirements[requirement]
s_c_db = get_sample_component(sample_id=self.sample_id,
component_name=component_to_check)
if not self.requirement_met(s_c_db, field, expected_value, log):
no_failures = False
else:
Expand Down

0 comments on commit 3515730

Please sign in to comment.