mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(workflow_records): default category
to WorkflowCategory.User
This allows old workflows to validate when reading them from the db or image files.
This commit is contained in:
@ -36,7 +36,9 @@ class WorkflowCategory(str, Enum, metaclass=MetaEnum):
|
|||||||
|
|
||||||
class WorkflowMeta(BaseModel):
|
class WorkflowMeta(BaseModel):
|
||||||
version: str = Field(description="The version of the workflow schema.")
|
version: str = Field(description="The version of the workflow schema.")
|
||||||
category: WorkflowCategory = Field(description="The category of the workflow (user or default).")
|
category: WorkflowCategory = Field(
|
||||||
|
default=WorkflowCategory.User, description="The category of the workflow (user or default)."
|
||||||
|
)
|
||||||
|
|
||||||
@field_validator("version")
|
@field_validator("version")
|
||||||
def validate_version(cls, version: str):
|
def validate_version(cls, version: str):
|
||||||
|
Reference in New Issue
Block a user