rtcclient
rtcclient copied to clipboard
Error while adding a new child to a workitem
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.
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 Thanks for your PR. This bug is duplicate with #95, which has already been fixed.