Skip to content

Commit 29739a5

Browse files
authored
Check if SammpleType is set (#2053)
This fixes #2052
1 parent a70b082 commit 29739a5

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

bika/lims/content/sample.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -469,9 +469,10 @@
469469
visible=False,
470470
),
471471
),
472-
ComputedField('SampleTypeUID',
473-
expression = 'context.getSampleType().UID()',
474-
widget = ComputedWidget(
472+
ComputedField(
473+
'SampleTypeUID',
474+
expression='context.getSampleType() and context.getSampleType().UID() or None',
475+
widget=ComputedWidget(
475476
visible=False,
476477
),
477478
),

docs/CHANGELOG.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
3.2.1b3 (unreleased)
22
--------------------
33

4-
- no changes yet
4+
- Issue-2052: Computed Sample Field "SampleTypeUID" does not check if a SampleType is set
55

66

77
3.2.1b2 (2017-05-27)

0 commit comments

Comments
 (0)