rtcclient icon indicating copy to clipboard operation
rtcclient copied to clipboard

Error while adding a new child to a workitem

Open Shruthi-KRamesh opened this issue 8 years ago • 2 comments

client = RTCClient(server, username = username, password = password, ends_with_jazz = True)
workitem = client.getWorkitem(133350)

workitem.addChild(133451)

the code works fine until getting a workitem, and when I try to add a child to it, I get the below error.

'NoneType' object is not iterable

I can assure that the workitem I am willing to add as a child already exists.

Shruthi-KRamesh avatar Jun 29 '17 11:06 Shruthi-KRamesh

The error is not in the addChild method of the workitem. it's in the _addChildren method, cur_child_ids = [cur_child.identifier for cur_child in cur_children] at this line when we say cur_child.identifier, we will get error if cur_child is None. This happens if the workitem doesn't have any children initially.

ameyyadav09 avatar Jun 29 '17 11:06 ameyyadav09

@ameyyadav09 Thanks for your PR. This bug is duplicate with #95, which has already been fixed.

dixudx avatar Jun 29 '17 12:06 dixudx