Skip to content

Commit

Permalink
removed exception of RI is not present
Browse files Browse the repository at this point in the history
  • Loading branch information
hechth committed Jan 30, 2024
1 parent b949c26 commit 899c321
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions RIAssigner/data/PandasData.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ def retention_indices(self) -> Iterable[Data.RetentionIndexType]:
""" Get retention indices from data or computed from carbon numbers. """
if self._carbon_number_index is not None:
return self._ri_from_carbon_numbers()
if not self._data[self._ri_index].isnull().all():
return self._data[self._ri_index]
raise KeyError("Dataset does not contain retention indices!")
return self._data[self._ri_index]

def _ri_from_carbon_numbers(self):
""" Returns the RI of compound based on carbon number. """
Expand Down

0 comments on commit 899c321

Please sign in to comment.