diff --git a/CHANGES.rst b/CHANGES.rst index 22b7568dca..83f82c4c0f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -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 diff --git a/bika/lims/adapters/widgetvisibility.py b/bika/lims/adapters/widgetvisibility.py index 18c22a14c4..12d0602069 100644 --- a/bika/lims/adapters/widgetvisibility.py +++ b/bika/lims/adapters/widgetvisibility.py @@ -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