From b8af8d51732e7f67396272fa6d7d2a6b2947fc2b Mon Sep 17 00:00:00 2001 From: Nicholas Lambourne Date: Tue, 28 Nov 2023 20:07:25 +1000 Subject: [PATCH] [BUG] Add to_dict() function on View objects (#54) --- slackblocks/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/slackblocks/views.py b/slackblocks/views.py index 7d9c58b..67da02f 100644 --- a/slackblocks/views.py +++ b/slackblocks/views.py @@ -50,6 +50,9 @@ def _resolve(self) -> Dict[str, Any]: view["external_id"] = self.external_id return view + def to_dict(self) -> Dict[str, Any]: + return self._resolve() + def __repr__(self) -> str: return dumps(self._resolve(), indent=4)