You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.
When a signature request is created with multiple files, the SDK sends them in a manner that results in them appearing in random order when they have to be signed. I've been digging into this and have found the cause which I'll explain below.
However, the documentation for the Requests library states that a list (which is an ordered iterable) be used for this argument here and the example clearly is of a list of tuples:
What I'm guessing happens is that the Requests library converts the dictionary into a list, ignoring the keys and appending only the values in a random order because dict is an unordered data structure.
The text was updated successfully, but these errors were encountered:
jeteon
added a commit
to jeteon/hellosign-python-sdk
that referenced
this issue
Jan 17, 2018
The data structure prepared by `format_file_params` is supposed to be a list of tuples with a certain structure, not the dict one created currently. See hellosign#34 for details of the issue being addressed here.
When a signature request is created with multiple files, the SDK sends them in a manner that results in them appearing in random order when they have to be signed. I've been digging into this and have found the cause which I'll explain below.
When a signature request is created that includes files, the
HSClient
class uses theHSFormat
class to convert them into a data structure used in the request: https://github.com/HelloFax/hellosign-python-sdk/blob/ac8a1fcea8f4c2fdc56a408bc4d50efa7c6bfd91/hellosign_sdk/hsclient.py#L1383 like so: https://github.com/HelloFax/hellosign-python-sdk/blob/ac8a1fcea8f4c2fdc56a408bc4d50efa7c6bfd91/hellosign_sdk/hsclient.py#L1427However the
HSFormat
creates an inappropriate data structure for this:https://github.com/HelloFax/hellosign-python-sdk/blob/ac8a1fcea8f4c2fdc56a408bc4d50efa7c6bfd91/hellosign_sdk/utils/hsformat.py#L40-L49Basically, it creates a dictionary with a
"file[j]"
key for each file. This dictionary is eventually fed into a call to thepost
method of the Requests library as thefiles
argument: https://github.com/HelloFax/hellosign-python-sdk/blob/ac8a1fcea8f4c2fdc56a408bc4d50efa7c6bfd91/hellosign_sdk/utils/request.py#L167However, the documentation for the Requests library states that a list (which is an ordered iterable) be used for this argument here and the example clearly is of a
list
oftuple
s:What I'm guessing happens is that the Requests library converts the dictionary into a list, ignoring the keys and appending only the values in a random order because
dict
is an unordered data structure.The text was updated successfully, but these errors were encountered: