Skip to content

Commit

Permalink
Fix AttributeError when creating AnalysisSpec with results range via …
Browse files Browse the repository at this point in the history
…JSONAPI (#2431)

* Update validators.py

* #2428 Fix error raise when create analysisspec with resultsrange by JSONAPI

---------

Co-authored-by: Jordi Puiggené <jp@naralabs.com>
  • Loading branch information
fengyundeng and xispa authored Nov 26, 2023
1 parent 5338447 commit ae59b8e
Show file tree
Hide file tree
Showing 2 changed files with 2 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.5.0 (unreleased)
------------------

- #2431 Fix AttributeError when creating AnalysisSpec with results range via JSONAPI
- #2436 Fix instrument locations not displayed in listing
- #2433 Fix multi-valued interim fields are not displayed correctly
- #2429 Fix recipients column in report listing to show those recipients to whom the report was also sent to
Expand Down
2 changes: 1 addition & 1 deletion src/bika/lims/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ class AnalysisSpecificationsValidator:

def __call__(self, value, *args, **kwargs):
instance = kwargs["instance"]
request = kwargs.get("REQUEST", {})
request = kwargs.get("REQUEST") or {}
fieldname = kwargs["field"].getName()

# This value in request prevents running once per subfield value.
Expand Down

0 comments on commit ae59b8e

Please sign in to comment.