refactor: derive update schemas with PartialUpdateModel

This commit is contained in:
Mark Paronyan committed 2026-10-06 16:46:22 +03:00
1 parent 65c858d455
commit d9678ce98c
34 files changed
+276 -70

No files matched your search

+3 -2
View File
@@ -21,6 +21,7 @@ from uuid import UUID, uuid4
from pydantic import BaseModel, Field
from ..common import ConsoleType, CustomAdapter, NodeStatus
from ..update import PartialUpdateModel
from .labels import Label
@@ -169,12 +170,12 @@ class NodeCreate(NodeBase):
node_id: UUID = Field(default_factory=uuid4)
class NodeUpdate(NodeBase):
class NodeUpdate(PartialUpdateModel, NodeBase):
"""
Data to update a node.
"""
pass
update_excluded_fields = ("node_id", "compute_id", "node_type")
class Node(NodeBase):