-
Notifications
You must be signed in to change notification settings - Fork 79
Description
When calling getAttachments() for an artifact with multiple attachments with the same filename, I seem to get an error the second time pyral tries to get the attachment.
'bytes' object has no attribute 'oid' error
The original rally.get() request to get the user story showed that it has 23 attachments.

But when I called getAttachmentNames, it would return 24 results with two entries for the duplicated file name:

Through the UI, I confirmed there was a file named Archive.zip that was uploaded twice (on two different dates) but downloading them seemed to return identical files.
To resolve the issue, I converted the list of attachment files to a set and then fetched each individual attachment (instead of using getAttachments()). Not sure why having the list with duplicated file names causes getAttachments() to fail, but a quick bandaid could be to convert the list to a set as I had done here: https://github.com/RallyTools/RallyRestToolkitForPython/blob/master/pyral/restapi.py#L1702