From d06d136f751869493360e61ffd9b479e66500152 Mon Sep 17 00:00:00 2001 From: oneor0 Date: Fri, 29 Oct 2021 11:36:34 +0300 Subject: [PATCH] build method always must produce json-like dicts --- blockkit/components.py | 3 ++- setup.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/blockkit/components.py b/blockkit/components.py index de7a67e..591d24e 100644 --- a/blockkit/components.py +++ b/blockkit/components.py @@ -1,3 +1,4 @@ +import json from typing import TYPE_CHECKING, Any, List, Type, Union from pydantic import BaseModel @@ -44,4 +45,4 @@ def _expand_str( return value def build(self) -> dict: - return self.dict(by_alias=True, exclude_none=True) + return json.loads(self.json(by_alias=True, exclude_none=True)) diff --git a/setup.py b/setup.py index 79cc5b3..15bc128 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ EMAIL = "imryche13@gmail.com" AUTHOR = "Dmitry Chernyshov" REQUIRES_PYTHON = ">=3.6.0" -VERSION = "1.3.3" +VERSION = "1.3.4" REQUIRED = ["pydantic", "black"] EXTRAS = {}