Skip to content

Commit 3ecefbd

Browse files
committed
Fix GetValueAt method and update DTL transformation to handle integer properties
1 parent ffa1afc commit 3ecefbd

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

src/iop/cls/IOP/Message.cls

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ Method GetValueAt(
5656
Set matches = parser.find(tJSON)
5757

5858
Set tResult = ""
59-
zw
6059
// Return the first match
6160
if matches."__len__"() = 1 {
6261
Set match = matches."__getitem__"(0)

src/tests/cls/SimpleMessageSetVDoc.cls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ XData DTL [ XMLNamespace = "http://www.intersystems.com/dtl" ]
1313
{
1414
<transform sourceClass='IOP.Message' targetClass='IOP.Message' sourceDocType='registerFilesIop.message.SimpleMessage' targetDocType='registerFilesIop.message.SimpleMessage' create='new' language='objectscript' >
1515
<assign value='source.{string}' property='target.{string}' action='set' />
16+
<assign value='source.{integer}' property='target.{integer}' action='set' />
1617
</transform>
1718
}
1819

src/tests/test_iop_dtl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,5 +97,5 @@ def test_set_transform_vdoc(load_cls_files, iop_message):
9797
_Utils.raise_on_error(iris.cls('UnitTest.SimpleMessageSetVDoc').Transform(iop_message, ref))
9898
result = ref.value
9999

100-
assert json.loads(result.json) == json.loads('{"string":"Foo"}')
100+
assert json.loads(result.json) == json.loads('{"string":"Foo", "integer":42}')
101101
assert result.classname == 'registerFilesIop.message.SimpleMessage'

0 commit comments

Comments
 (0)