Skip to content

Strange Behavior with Copy #1400

Open
Open
@yoavkatz

Description

If we copy a string to a nested field in another string field (which is meaningless) , we get this odd behavior that the target string field becomes a dictionary, with the copied value.

def test_copy_string_to_string_error(self):
        inputs = [
            {"source": "hello", "task_data" :3}
        ]

        targets = [{"source": "hello","task_data": {'source': 'hello'}}]

        check_operator(
            operator=Copy(field="source", to_field="task_data/source"),  <-- this should fail because task_data does not have a 'source field' . Instead it works.
            inputs=inputs,
            targets=targets,
            tester=self,
        )

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions