Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix occasional error when labeling samples w/o report as printed #1454

Merged
merged 1 commit into from
Oct 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Changelog

**Fixed**

- #1454 Fix occasional error when labeling samples w/o report as printed
- #1452 Fix missing error percentage calculation for reference samples
- #1447 New Client contact has access to last client's Sample only
- #1446 Parameter `group` in `contact._addUserToGroup` was not considered
Expand Down
2 changes: 2 additions & 0 deletions bika/lims/browser/workflow/analysisrequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ def set_printed_time(self, sample):
return False
reports = sample.objectValues("ARReport")
reports = sorted(reports, key=lambda report: report.getDatePublished())
if not reports:
return False
last_report = reports[-1]
if not last_report.getDatePrinted():
last_report.setDatePrinted(DateTime())
Expand Down