diff --git a/CHANGES.txt b/CHANGES.txt
index c5483266..d4e04e0d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,12 @@
Pyxform Changelog
+# v1.5.1, 2021-05-18
+
+* #535 Don't check for dynamic label if there is no label
+ * Hélène Martin @lognaturel (ODK)
+* #536 Expand refs in predicates using current() even if preceded by whitespace
+ * Agus Hilman @gushil (OpenClinica)
+
# v1.5.0, 2021-04-16
* #521 Use itext for dynamic selects with dynamic labels
diff --git a/README.rst b/README.rst
index c3dfafc6..f02678d2 100644
--- a/README.rst
+++ b/README.rst
@@ -1,5 +1,5 @@
===============
-pyxform v1.5.0
+pyxform v1.5.1
===============
|circleci| |appveyor| |codecov| |black|
diff --git a/pyxform/__init__.py b/pyxform/__init__.py
index f754c256..eda816a6 100644
--- a/pyxform/__init__.py
+++ b/pyxform/__init__.py
@@ -4,7 +4,7 @@
Collect easy.
"""
-__version__ = "1.5.0"
+__version__ = "1.5.1"
from pyxform.builder import (
SurveyElementBuilder,
diff --git a/pyxform/tests_v1/test_repeat.py b/pyxform/tests_v1/test_repeat.py
index 444d6c55..7e834efd 100644
--- a/pyxform/tests_v1/test_repeat.py
+++ b/pyxform/tests_v1/test_repeat.py
@@ -818,14 +818,14 @@ def test_repeat_with_reference_path_in_a_method_with_spaces_in_predicate_uses_cu
| | calculate | pos1 | | position(..) |
| | begin repeat | rep5 | | |
| | calculate | pos5 | | position(..) |
- | | calculate | item5 | | instance('item')/root/item[index=number(1+ ${pos5} and ${pos1} = 1]/label |
+ | | calculate | item5 | | instance('item')/root/item[index=number(1+ ${pos5}) and ${pos1} = 1]/label |
| | end repeat | | | |
"""
self.assertPyxformXform(
name="data",
md=xlsform_md,
xml__contains=[
- """""" # noqa pylint: disable=line-too-long
+ """""" # noqa pylint: disable=line-too-long
],
)
@@ -953,19 +953,19 @@ def test_repeat_with_reference_path_after_instance_in_predicate_uses_current(sel
${pos5} that is in 'position()=${pos5}'' uses current because it is in a predicate (eventhough not in an instance)
"""
xlsform_md = """
- | survey | | | | |
- | | type | name | label | calculation |
- | | xml-external | item | | |
- | | begin repeat | rep5 | | |
- | | calculate | pos5 | | position(..) |
- | | calculate | item5 | | concat(instance('item')/root/item[index =${pos5}]/label, @data/form/[position()=${pos5}]/text |
- | | end repeat | | | |
+ | survey | | | | |
+ | | type | name | label | calculation |
+ | | xml-external | item | | |
+ | | begin repeat | rep5 | | |
+ | | calculate | pos5 | | position(..) |
+ | | calculate | item5 | | concat(instance('item')/root/item[index =${pos5}]/label, /data[position()=${pos5}]/text) |
+ | | end repeat | | | |
"""
self.assertPyxformXform(
name="data",
md=xlsform_md,
xml__contains=[
- """""", # noqa pylint: disable=line-too-long
+ """""", # noqa pylint: disable=line-too-long
],
)
diff --git a/setup.py b/setup.py
index 0c52bf2c..50ab0578 100644
--- a/setup.py
+++ b/setup.py
@@ -14,7 +14,7 @@
setup(
name="pyxform",
- version="1.5.0",
+ version="1.5.1",
author="github.com/xlsform",
author_email="info@xlsform.org",
packages=find_packages(),