Compare commits

...

8 Commits

Author SHA1 Message Date
Andrew Shumway
98f3abeaac Add quotes to values in one off 2024-07-23 16:10:22 -06:00
Andrew Shumway
8a3bdd181d Pull main 2024-07-10 08:36:49 -06:00
Andrew Shumway
a81dc83133 pull main 2024-07-05 09:07:08 -06:00
Andrew Shumway
cc24604aa4 Pull main 2024-06-27 08:47:01 -06:00
Andrew Shumway
ea8cfbdadb poetry lock 2024-06-13 10:43:46 -06:00
Andrew Shumway
d1ed7e1d0c Pull main 2024-06-12 09:29:37 -06:00
Andrew Shumway
f9169fcbcb poetry lock 2024-06-03 15:55:37 -06:00
Andrew Shumway
17b21b2382 Pull main 2024-05-31 09:27:42 -06:00
2 changed files with 12 additions and 1 deletions

View File

@@ -1,3 +1,4 @@
from pipes import quote
import time
import uuid
from string import ascii_uppercase
@@ -93,6 +94,7 @@ def get_example_csv_rows(template, use_example_as_example=True, submitted_fields
)
@user_has_permissions("send_messages", restrict_admin_usage=True)
def send_messages(service_id, template_id):
print(hilite("top of send_messages"))
notification_count = service_api_client.get_notification_count(service_id)
remaining_messages = current_service.message_limit - notification_count
@@ -485,6 +487,7 @@ def send_one_off_step(service_id, template_id, step_index):
def _check_messages(service_id, template_id, upload_id, preview_row, **kwargs):
print(hilite("top of _check_messages"))
try:
# The happy path is that the job doesnt already exist, so the
# API will return a 404 and the client will raise HTTPError.
@@ -620,6 +623,7 @@ def _check_messages(service_id, template_id, upload_id, preview_row, **kwargs):
@user_has_permissions("send_messages", restrict_admin_usage=True)
def check_messages(service_id, template_id, upload_id, row_index=2):
data = _check_messages(service_id, template_id, upload_id, row_index)
print(hilite(f"data after checking messages: \n {data}"))
data["allowed_file_extensions"] = Spreadsheet.ALLOWED_FILE_EXTENSIONS
if (
@@ -956,7 +960,10 @@ def send_notification(service_id, template_id):
values = []
for k, v in session["placeholders"].items():
keys.append(k)
values.append(v)
print(hilite(f"value: {v} type: {type(v)}"))
value_quotes = '"' + v + '"'
print(hilite(f"value with quotes: {value_quotes}"))
values.append(value_quotes)
data = ",".join(keys)
vals = ",".join(values)

4
poetry.lock generated
View File

@@ -1344,9 +1344,13 @@ files = [
{file = "lxml-5.2.2-cp36-cp36m-win_amd64.whl", hash = "sha256:edcfa83e03370032a489430215c1e7783128808fd3e2e0a3225deee278585196"},
{file = "lxml-5.2.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:28bf95177400066596cdbcfc933312493799382879da504633d16cf60bba735b"},
{file = "lxml-5.2.2-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3a745cc98d504d5bd2c19b10c79c61c7c3df9222629f1b6210c0368177589fb8"},
{file = "lxml-5.2.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1b590b39ef90c6b22ec0be925b211298e810b4856909c8ca60d27ffbca6c12e6"},
{file = "lxml-5.2.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b336b0416828022bfd5a2e3083e7f5ba54b96242159f83c7e3eebaec752f1716"},
{file = "lxml-5.2.2-cp37-cp37m-manylinux_2_28_aarch64.whl", hash = "sha256:c2faf60c583af0d135e853c86ac2735ce178f0e338a3c7f9ae8f622fd2eb788c"},
{file = "lxml-5.2.2-cp37-cp37m-manylinux_2_28_x86_64.whl", hash = "sha256:4bc6cb140a7a0ad1f7bc37e018d0ed690b7b6520ade518285dc3171f7a117905"},
{file = "lxml-5.2.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7ff762670cada8e05b32bf1e4dc50b140790909caa8303cfddc4d702b71ea184"},
{file = "lxml-5.2.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:57f0a0bbc9868e10ebe874e9f129d2917750adf008fe7b9c1598c0fbbfdde6a6"},
{file = "lxml-5.2.2-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:a6d2092797b388342c1bc932077ad232f914351932353e2e8706851c870bca1f"},
{file = "lxml-5.2.2-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:60499fe961b21264e17a471ec296dcbf4365fbea611bf9e303ab69db7159ce61"},
{file = "lxml-5.2.2-cp37-cp37m-win32.whl", hash = "sha256:d9b342c76003c6b9336a80efcc766748a333573abf9350f4094ee46b006ec18f"},
{file = "lxml-5.2.2-cp37-cp37m-win_amd64.whl", hash = "sha256:b16db2770517b8799c79aa80f4053cd6f8b716f21f8aca962725a9565ce3ee40"},