Skip to content

Commit

Permalink
Use optional converter for job state
Browse files Browse the repository at this point in the history
  • Loading branch information
ljcornel committed Jul 11, 2023
1 parent 4ad11c4 commit 1880114
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion geti_sdk/data_models/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
attr_value_serializer,
str_to_datetime,
str_to_enum_converter,
str_to_optional_enum_converter,
)
from geti_sdk.http_session import GetiRequestException, GetiSession

Expand Down Expand Up @@ -203,7 +204,7 @@ class Job:
author: Optional[User] = None # Added in Geti v1.7
cancellation_info: Optional[JobCancellationInfo] = None # Added in Geti v1.7
state: Optional[str] = attr.field(
converter=str_to_enum_converter(JobState), default=None
converter=str_to_optional_enum_converter(JobState), default=None
) # Added in Geti v1.7
steps: Optional[List[dict]] = None # Added in Geti v1.7

Expand Down

0 comments on commit 1880114

Please sign in to comment.