Skip to content

Commit

Permalink
feat: add modelUUID as optional value (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
dtria91 authored Aug 7, 2024
1 parent 28f485a commit 672d6b4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/app/models/model_dto.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ class ModelFeatures(BaseModel):


class ModelIn(BaseModel, validate_assignment=True):
uuid: Optional[UUID] = None
name: str
description: Optional[str] = None
model_type: ModelType
Expand Down Expand Up @@ -179,6 +180,7 @@ def timestamp_must_be_datetime(self) -> Self:
def to_model(self) -> Model:
now = datetime.datetime.now(tz=datetime.UTC)
return Model(
uuid=self.uuid,
name=self.name,
description=self.description,
model_type=self.model_type.value,
Expand Down

0 comments on commit 672d6b4

Please sign in to comment.