Skip to content

Commit 7835d36

Browse files
authored
Fix issue 43337 (#47)
1 parent 9a4daf6 commit 7835d36

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

CHANGE.txt

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@
22
LabKey Python Client API News
33
+++++++++++
44

5+
What's New in the LabKey 2.1.1 package
6+
==============================
7+
8+
*Release date: 06/23/2021*
9+
- Fix issue with domain.create raising exception when attempting to create a domain from a template (Issue 43337)
10+
511
What's New in the LabKey 2.1.0 package
612
==============================
713

8-
*Release date: TBD*
14+
*Release date: 05/12/2021*
915
- Add support for ontology based column filters ONTOLOGY_IN_SUBTREE and ONTOLOGY_NOT_IN_SUBTREE
1016
- ServerContext.make_request: payload is now optional
1117
- ServerContext.make_request: add json kwarg

labkey/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
from labkey import domain, query, experiment, security, utils
1717

1818
__title__ = "labkey"
19-
__version__ = "2.1.0"
19+
__version__ = "2.1.1"
2020
__author__ = "LabKey"
2121
__license__ = "Apache License 2.0"

labkey/domain.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -390,10 +390,14 @@ def create(
390390
"""
391391
url = server_context.build_url("property", "createDomain.api", container_path=container_path)
392392
domain = None
393-
domain_fields = domain_definition["domainDesign"]["fields"]
394-
domain_definition["domainDesign"]["fields"] = list(
395-
map(__format_conditional_filters, domain_fields)
396-
)
393+
394+
# domainDesign is not required when creating a domain from a template
395+
if domain_definition["domainDesign"] is not None:
396+
domain_fields = domain_definition["domainDesign"]["fields"]
397+
domain_definition["domainDesign"]["fields"] = list(
398+
map(__format_conditional_filters, domain_fields)
399+
)
400+
397401
raw_domain = server_context.make_request(url, json=domain_definition)
398402

399403
if raw_domain is not None:

0 commit comments

Comments
 (0)