From 58e5b7c432bf27e8fb194cfe21914875a9606155 Mon Sep 17 00:00:00 2001 From: Nicholas Lambourne Date: Thu, 17 Aug 2023 22:58:02 +1000 Subject: [PATCH] [BUG] Ensure ModalView optional fields allow None defaults (#41) --- slackblocks/views.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/slackblocks/views.py b/slackblocks/views.py index 4b68a16..7d9c58b 100644 --- a/slackblocks/views.py +++ b/slackblocks/views.py @@ -76,8 +76,12 @@ def __init__( external_id=external_id, ) self.title = Text.to_text(title, force_plaintext=True, max_length=24) - self.close = Text.to_text(close, force_plaintext=True, max_length=24) - self.submit = Text.to_text(submit, force_plaintext=True, max_length=24) + self.close = Text.to_text( + close, force_plaintext=True, max_length=24, allow_none=True + ) + self.submit = Text.to_text( + submit, force_plaintext=True, max_length=24, allow_none=True + ) self.clear_on_close = clear_on_close self.notify_on_close = notify_on_close self.submit_disabled = submit_disabled