Skip to content

Commit

Permalink
Fix Venkat's adding client type pr not backwards compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgxue committed Mar 1, 2024
1 parent 98d0eef commit 4faa87b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/ask_astro/models/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class AskAstroRequest(BaseModel):
False,
description="Whether the request is an example",
)
client: str = Field(None, description="The client type used to send the request -- webapp/slack")
client: str | None = Field(None, description="The client type used to send the request -- webapp/slack")

def to_firestore(self) -> dict[str, Any]:
"""
Expand Down Expand Up @@ -107,7 +107,7 @@ def from_dict(cls, response_dict: dict[str, Any]) -> AskAstroRequest:
response_received_at=response_dict.get("response_received_at"),
is_processed=response_dict.get("is_processed", False),
is_example=response_dict.get("is_example", False),
client=response_dict["client"],
client=response_dict.get("client", None),
)


Expand Down

0 comments on commit 4faa87b

Please sign in to comment.