mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-04 06:21:15 +02:00
refactor: derive update schemas with PartialUpdateModel
This commit is contained in:
34 files changed
+276
-70
No files matched your search
@@ -21,6 +21,8 @@ from uuid import UUID
|
||||
|
||||
from pydantic import BaseModel, Field, HttpUrl
|
||||
|
||||
from ..update import PartialUpdateModel
|
||||
|
||||
|
||||
class ProjectStatus(str, Enum):
|
||||
"""
|
||||
@@ -82,12 +84,12 @@ class ProjectDuplicate(ProjectBase):
|
||||
reset_mac_addresses: Optional[bool] = Field(False, description="Reset MAC addresses for this project")
|
||||
|
||||
|
||||
class ProjectUpdate(ProjectBase):
|
||||
class ProjectUpdate(PartialUpdateModel, ProjectBase):
|
||||
"""
|
||||
Properties for project update.
|
||||
"""
|
||||
|
||||
pass
|
||||
update_excluded_fields = ("project_id", "path")
|
||||
|
||||
|
||||
class Project(ProjectBase):
|
||||
|
||||
Reference in new issue
Block a user