Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored and ogabrielluiz committed Dec 23, 2024
1 parent 4ff377e commit de3f2c6
Showing 1 changed file with 7 additions and 21 deletions.
28 changes: 7 additions & 21 deletions src/backend/base/langflow/services/database/models/flow/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,14 @@

class FlowBase(SQLModel):
name: str = Field(index=True)
description: str | None = Field(
default=None, sa_column=Column(Text, index=True, nullable=True)
)
description: str | None = Field(default=None, sa_column=Column(Text, index=True, nullable=True))
icon: str | None = Field(default=None, nullable=True)
icon_bg_color: str | None = Field(default=None, nullable=True)
gradient: str | None = Field(default=None, nullable=True)
data: dict | None = Field(default=None, nullable=True)
is_component: bool | None = Field(default=False, nullable=True)
updated_at: datetime | None = Field(
default_factory=lambda: datetime.now(timezone.utc), nullable=True
)
webhook: bool | None = Field(
default=False, nullable=True, description="Can be used on the webhook endpoint"
)
updated_at: datetime | None = Field(default_factory=lambda: datetime.now(timezone.utc), nullable=True)
webhook: bool | None = Field(default=False, nullable=True, description="Can be used on the webhook endpoint")
endpoint_name: str | None = Field(default=None, nullable=True, index=True)
tags: list[str] | None = None
locked: bool | None = Field(default=False, nullable=True)
Expand Down Expand Up @@ -174,9 +168,7 @@ class Flow(FlowBase, table=True): # type: ignore[call-arg]
icon: str | None = Field(default=None, nullable=True)
tags: list[str] | None = Field(sa_column=Column(JSON), default=[])
locked: bool | None = Field(default=False, nullable=True)
folder_id: UUID | None = Field(
default=None, foreign_key="folder.id", nullable=True, index=True
)
folder_id: UUID | None = Field(default=None, foreign_key="folder.id", nullable=True, index=True)
folder: Optional["Folder"] = Relationship(back_populates="flows")
messages: list["MessageTable"] = Relationship(back_populates="flow")
transactions: list["TransactionTable"] = Relationship(back_populates="flow")
Expand Down Expand Up @@ -219,16 +211,10 @@ class FlowHeader(BaseModel):
None,
description="The ID of the folder containing the flow. None if not associated with a folder",
)
is_component: bool | None = Field(
None, description="Flag indicating whether the flow is a component"
)
endpoint_name: str | None = Field(
None, description="The name of the endpoint associated with this flow"
)
is_component: bool | None = Field(None, description="Flag indicating whether the flow is a component")
endpoint_name: str | None = Field(None, description="The name of the endpoint associated with this flow")
description: str | None = Field(None, description="A description of the flow")
data: dict | None = Field(
None, description="The data of the component, if is_component is True"
)
data: dict | None = Field(None, description="The data of the component, if is_component is True")

@field_validator("data", mode="before")
@classmethod
Expand Down

0 comments on commit de3f2c6

Please sign in to comment.