Skip to content

Commit f545d1c

Browse files
committed
add function class to patch models
1 parent 2f5c11a commit f545d1c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/models-library/src/models_library/functions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ class RegisteredProjectFunctionJob(ProjectFunctionJob, RegisteredFunctionJobBase
176176

177177

178178
class RegisteredProjectFunctionJobPatch(BaseModel):
179-
function_class: FunctionClass
179+
function_class: Literal[FunctionClass.PROJECT] = FunctionClass.PROJECT
180180
title: str | None
181181
description: str | None
182182
project_job_id: ProjectID | None
@@ -194,7 +194,7 @@ class RegisteredSolverFunctionJob(SolverFunctionJob, RegisteredFunctionJobBase):
194194

195195

196196
class RegisteredSolverFunctionJobPatch(BaseModel):
197-
function_class: FunctionClass
197+
function_class: Literal[FunctionClass.SOLVER] = FunctionClass.SOLVER
198198
title: str | None
199199
description: str | None
200200
solver_job_id: ProjectID | None
@@ -210,7 +210,7 @@ class RegisteredPythonCodeFunctionJob(PythonCodeFunctionJob, RegisteredFunctionJ
210210

211211

212212
class RegisteredPythonCodeFunctionJobPatch(BaseModel):
213-
function_class: FunctionClass
213+
function_class: Literal[FunctionClass.PYTHON_CODE] = FunctionClass.PYTHON_CODE
214214
title: str | None
215215
description: str | None
216216

0 commit comments

Comments
 (0)