Skip to content

Commit

Permalink
allow to add viewers in document creation
Browse files Browse the repository at this point in the history
  • Loading branch information
genaromadrid committed Sep 23, 2021
1 parent 4e55ce7 commit 8eb7595
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mifiel/document.py
Expand Up @@ -47,6 +47,14 @@ def create(client, signatories, **kwargs):
{'signatories[' + str(index) + '][' + str(key) + ']': val}
)

if 'viewers' in data:
viewers = data.pop('viewers')
for index, item in enumerate(viewers):
for key, val in item.items():
data.update(
{'viewers[' + str(index) + '][' + str(key) + ']': val}
)

if 'callback_url' in kwargs: data['callback_url'] = kwargs.get('callback_url')
if file:
mimetype = mimetypes.guess_type(file)[0]
Expand Down

0 comments on commit 8eb7595

Please sign in to comment.