Skip to content

Commit

Permalink
Fix rejected sample analyses are re-added on profile removal (#2672)
Browse files Browse the repository at this point in the history
* Only set analyses when profiles are set

* Changelog updated

---------

Co-authored-by: Jordi Puiggené <[email protected]>
  • Loading branch information
ramonski and xispa authored Feb 12, 2025
1 parent 6bac87e commit a55d09c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
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)
------------------

- #2672 Fix rejected sample analyses are re-added on profile removal
- #2670 Flush calculated result if dependency is flushed
- #2667 Specifications support for multi-result analyses
- #2668 Paste support for select components in sample add form
Expand Down
5 changes: 4 additions & 1 deletion src/bika/lims/content/analysisrequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1516,7 +1516,10 @@ def setProfiles(self, value):

# Don't add analyses from profiles during sample creation.
# In this case the required analyses are added afterwards explicitly.
if not api.is_temporary(self):
#
# Also only add analyses if a profile (value) is selected:
# https://github.com/senaite/senaite.core/pull/2672
if value and not api.is_temporary(self):
# get the profiles
profiles = map(api.get_object_by_uid, uids)
# get the current set of analyses/services
Expand Down

0 comments on commit a55d09c

Please sign in to comment.