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

Error when viewing a Sample w/o Batch as client contact #1510

Merged
merged 3 commits into from
Jan 28, 2020
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 @@ -35,6 +35,7 @@ Changelog

**Fixed**

- #1510 Error when viewing a Sample w/o Batch as client contact
- #1511 Links to partitions for Internal Use are displayed in partitions viewlet
- #1505 Manage Analyses Form re-applies partitioned Analyses back to the Root
- #1503 Avoid duplicate CSS IDs in multi-column Add form
Expand Down
2 changes: 1 addition & 1 deletion bika/lims/adapters/widgetvisibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def isVisible(self, field, mode="view", default="visible"):
# is assigned to does not have a client assigned (e.g., the
# batch was assigned by lab personnel), hide this field
batch = self.context.getBatch()
if batch.getClient() != client:
if batch and batch.getClient() != client:
return "invisible"

return default
Expand Down