From 3e0a37d93dca2ea4b6a0084fc0604a95ad3ce3b2 Mon Sep 17 00:00:00 2001 From: david-kn Date: Thu, 10 Jun 2021 12:30:44 +0200 Subject: [PATCH] Make enterprise attributes optional Allow to receive commands from non-enterprise workspaces --- fastapi_slack.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fastapi_slack.py b/fastapi_slack.py index 9744cd8..9c0f068 100644 --- a/fastapi_slack.py +++ b/fastapi_slack.py @@ -6,6 +6,7 @@ from fastapi import APIRouter, Depends, Header, HTTPException, Request from pkg_resources import get_distribution from pydantic import BaseModel, BaseSettings, SecretStr, ValidationError +from typing import Optional __all__ = ["SlashCommand", "router"] __version__ = get_distribution("fastapi-slack").version @@ -83,8 +84,8 @@ class SlashCommand(BaseModel): token: str team_id: str team_domain: str - enterprise_id: str - enterprise_name: str + enterprise_id: Optional[str] + enterprise_name: Optional[str] channel_id: str channel_name: str user_id: str