refactor: Update from_message method in MessageBase model to accept UUID as flow_id parameter
This commit is contained in:
parent
e6d1b2bc93
commit
e456b006ea
1 changed files with 1 additions and 1 deletions
|
|
@ -26,7 +26,7 @@ class MessageBase(SQLModel):
|
|||
return value
|
||||
|
||||
@classmethod
|
||||
def from_message(cls, message: "Message", flow_id: str | None = None):
|
||||
def from_message(cls, message: "Message", flow_id: str | UUID | None = None):
|
||||
# first check if the record has all the required fields
|
||||
if message.text is None or not message.sender or not message.sender_name:
|
||||
raise ValueError("The message does not have the required fields (text, sender, sender_name).")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue