Skip to content

Commit c7c08d1

Browse files
committed
fixing results page
1 parent 4210ee5 commit c7c08d1

2 files changed

Lines changed: 14 additions & 10 deletions

File tree

app/eSignature/examples/eg031_bulk_send/controller.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,23 +63,23 @@ def worker(cls, args):
6363
# Step 2 end
6464

6565
# Submit a bulk list
66-
# Step 3 start
66+
# Step 3-1 start
6767
bulk_envelopes_api = BulkEnvelopesApi(api_client)
6868
bulk_sending_list = cls.create_bulk_sending_list(args["signers"])
6969
bulk_list = bulk_envelopes_api.create_bulk_send_list(
7070
account_id=args["account_id"],
7171
bulk_sending_list=bulk_sending_list
7272
)
7373
bulk_list_id = bulk_list.list_id
74-
# Step 3 end
74+
# Step 3-1 end
7575

7676
# Create an envelope
77-
# Step 4 start
77+
# Step 4-1 start
7878
envelope_api = EnvelopesApi(api_client)
7979
envelope_definition = cls.make_draft_envelope()
8080
envelope = envelope_api.create_envelope(account_id=args["account_id"], envelope_definition=envelope_definition)
8181
envelope_id = envelope.envelope_id
82-
# Step 4 end
82+
# Step 4-1 end
8383

8484
# Attach your bulk list id to the envelope
8585
# Step 5 start
@@ -151,9 +151,11 @@ def worker(cls, args):
151151
# Step 8 start
152152
response = bulk_envelopes_api.get_bulk_send_batch_status(account_id=args["account_id"], bulk_send_batch_id=batch_id)
153153
# Step 8 end
154+
print(response)
154155

155156
return response
156157

158+
# Step 3-2 start
157159
@classmethod
158160
def create_bulk_sending_list(cls, args):
159161
"""
@@ -192,7 +194,9 @@ def create_bulk_sending_list(cls, args):
192194
)
193195

194196
return bulk_sending_list
197+
# Step 3-2 end
195198

199+
# Step 4-2 start
196200
@classmethod
197201
def make_draft_envelope(cls):
198202
"""
@@ -258,4 +262,5 @@ def make_draft_envelope(cls):
258262

259263
envelope_definition.recipients = Recipients(signers=[signer], carbon_copies=[cc])
260264

261-
return envelope_definition
265+
return envelope_definition
266+
# Step 4-2 end

app/eSignature/examples/eg031_bulk_send/views.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,14 @@ def bulk_send():
2626
try:
2727
# 2. Call the worker method for bulk sending
2828
response = Eg031Controller.worker(args)
29-
batch_id = response.batch_id
29+
queued = response.queued
3030
app.logger.info(f"The envelope has been sent to multiple recipients.")
3131

3232
# 3. Render the response
3333
return render_template("example_done.html",
34-
title="Bulk sending envelopes to multiple recipients",
35-
h1="Bulk sending envelopes to multiple recipients",
36-
message=f"""The envelope has been sent to recipients!<br/>
37-
Batch id: {batch_id}."""
34+
title="Bulk send envelope was successfully performed!",
35+
h1="Bulk send envelope was successfully performed!",
36+
message=f"""Bulk request queued to {queued} user lists.<br/>"""
3837
)
3938

4039
except ApiException as err:

0 commit comments

Comments
 (0)