diff --git a/CHANGES.rst b/CHANGES.rst index a99c25ce2b..b2ddaf803a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,7 @@ Changelog 2.6.0 (unreleased) ------------------ +- #2642 Fix Attribute Error in Upgrade Step 2619 - #2641 Fix AttributeError on rejection of samples without a contact set - #2640 Fix missing custom transitions via adapter in Worksheet's analyses - #2639 Fix sampletype-related indexes for AnalysisSpec type are not indexed diff --git a/src/senaite/core/upgrade/v02_06_000.py b/src/senaite/core/upgrade/v02_06_000.py index 295a0611de..133854fa15 100644 --- a/src/senaite/core/upgrade/v02_06_000.py +++ b/src/senaite/core/upgrade/v02_06_000.py @@ -2189,7 +2189,13 @@ def setup_result_types(tool): continue # check if it was set as a string result - string_result = obj.getField("StringResult").get(obj) + field = obj.getField("StringResult") + if not field: + # https://github.com/senaite/senaite.core/pull/2642 + logger.error("Field 'StringResult' not found on object %s (%s)" + % (api.get_path(obj), api.get_uid(obj))) + continue + string_result = field.get(obj) # get the results options type options_field = obj.getField("ResultOptionsType")