Skip to content

Commit

Permalink
Fix no reference spectra case
Browse files Browse the repository at this point in the history
  • Loading branch information
meier-rene committed Sep 24, 2024
1 parent 4999181 commit e9d3d2e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ def similarity_post(similarity_calculation): # noqa: E501
status=400,
)

logger.debug("Got %s reference spectra.", len(request.reference_spectra_list))
if request.reference_spectra_list is not None:
logger.debug("Got %s reference spectra.", len(request.reference_spectra_list))
references = spectra
if request.reference_spectra_list:
references = [s for s in references if s.metadata['spectrum_id'] in request.reference_spectra_list]
Expand Down

0 comments on commit e9d3d2e

Please sign in to comment.