Skip to content

Commit

Permalink
Count the length correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonski committed Nov 14, 2024
1 parent 3235989 commit a589d96
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bika/lims/workflow/analysis/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def check_all_verified(analysis):
"""Checks if all analyses are verified
"""
sample = analysis.getRequest()
analysis_uid = api.get_uid(analysis)
uid = api.get_uid(analysis)

# get all analyses of the sample
analyses = sample.getAnalyses()
Expand All @@ -252,8 +252,8 @@ def check_all_verified(analysis):
# NOTE: We remove the current processed analysis from the calculation,
# because it is either not yet verified or processed in multi-verify
# scenarios
analysis_count = filter(lambda x: api.get_uid(x) != analysis_uid, analyses)
verified_count = filter(lambda x: api.get_uid(x) != analysis_uid, verified)
analysis_count = len(filter(lambda x: api.get_uid(x) != uid, analyses))
verified_count = len(filter(lambda x: api.get_uid(x) != uid, verified))

return analysis_count == verified_count

Expand Down

0 comments on commit a589d96

Please sign in to comment.