Photoshop: Fix removed unsupported Path (#5996)

* Fix removed unsupported Path

Path is not json serializable by default, it is not necessary, better model reused.

* Fix wrong key

Must be 'path', not 'template_path' as workfile builder expects the former one.
This commit is contained in:
Petr Kalis 2023-12-04 18:28:08 +01:00 committed by GitHub
parent 50feef81f8
commit 1721563a5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,31 +1,18 @@
from pydantic import Field
from pathlib import Path
from ayon_server.settings import BaseSettingsModel
class PathsTemplate(BaseSettingsModel):
windows: Path = Field(
'',
title="Windows"
)
darwin: Path = Field(
'',
title="MacOS"
)
linux: Path = Field(
'',
title="Linux"
)
from ayon_server.settings import BaseSettingsModel, MultiplatformPathModel
class CustomBuilderTemplate(BaseSettingsModel):
_layout = "expanded"
task_types: list[str] = Field(
default_factory=list,
title="Task types",
)
template_path: PathsTemplate = Field(
default_factory=PathsTemplate
path: MultiplatformPathModel = Field(
default_factory=MultiplatformPathModel,
title="Template path"
)
@ -37,5 +24,6 @@ class WorkfileBuilderPlugin(BaseSettingsModel):
)
custom_templates: list[CustomBuilderTemplate] = Field(
default_factory=CustomBuilderTemplate
default_factory=CustomBuilderTemplate,
title="Template profiles"
)