From 23fda18424fa7505cf0be43a99707d9c1e928f4e Mon Sep 17 00:00:00 2001 From: Devesh Pal Date: Wed, 4 Sep 2024 12:19:23 +0530 Subject: [PATCH] fix: community creation --- swibots/api/community/models/community.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/swibots/api/community/models/community.py b/swibots/api/community/models/community.py index 29f34ef4..22e4125c 100644 --- a/swibots/api/community/models/community.py +++ b/swibots/api/community/models/community.py @@ -61,8 +61,8 @@ def to_json(self) -> JSONDict: "communityUsername": self.username, "communityProfileUrl": self.profile_url, "communityCoverUrl": self.cover_url, - "isPublic": self.is_public, - "isFree": self.is_free, + "public": self.is_public, + "free": self.is_free, "createdBy": self.created_by, "communityGuidelines": self.guidelines, "communityDescription": self.description, @@ -88,8 +88,8 @@ def from_json(self, data: Optional[JSONDict]) -> Optional["Community"]: self.username = data.get("communityUsername") self.profile_url = data.get("communityProfileUrl") self.cover_url = data.get("communityCoverUrl") - self.is_public = data.get("isPublic") - self.is_free = data.get("isFree") + self.is_public = data.get("public") + self.is_free = data.get("free") self.created_by = data.get("createdBy") self.guidelines = data.get("communityGuidelines") self.description = data.get("communityDescription")