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 partitions not displaying complete list of Interpretation Templates #2166

Merged
merged 1 commit into from
Oct 18, 2022
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.4.0 (unreleased)
------------------

- #2166 Fix partitions not displaying complete list of Interpretation Templates
- #2165 Add DX phone field and widget
- #2164 Added `IRetracted` and `IRejected` marker interfaces for analyses
- #2162 Allow to create samples without analyses
Expand Down
11 changes: 5 additions & 6 deletions src/senaite/core/browser/viewlets/resultsinterpretation.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,14 @@ def is_suitable(obj):
"""
obj = api.get_object(obj)
sample_types = obj.getRawSampleTypes() or [sample_type_uid]
if sample_type_uid not in sample_types:
return False
if sample_type_uid in sample_types:
return True

analysis_templates = obj.getRawAnalysisTemplates()
if analysis_templates:
if template_uid not in analysis_templates:
return False
if template_uid in analysis_templates:
return True

return True
return False

def get_data_info(item):
return {
Expand Down