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 Attribute Error in Upgrade Step 2619 #2642

Merged
merged 3 commits into from
Nov 11, 2024
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 @@ -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
Expand Down
8 changes: 7 additions & 1 deletion src/senaite/core/upgrade/v02_06_000.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Loading