Skip to content

Commit

Permalink
Fix lgweb errors
Browse files Browse the repository at this point in the history
Looks like a later version of pydantic is stricter about whether values
are required. A `Union[int, None]` without an initialised value of
`None` is no longer valid. To fix this, we simply initialise with
`None`.
  • Loading branch information
juliancarrivick committed Jan 15, 2024
1 parent 2094405 commit 8b97854
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions daliuge-translator/dlg/dropmake/web/translator_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
APP_DESCRIPTION = """
DALiuGE LG Web interface translates and deploys logical graphs.
The interface is split into two parts, refer to the main DALiuGE documentation
The interface is split into two parts, refer to the main DALiuGE documentation
[DALiuGE documentation](https://daliuge.readthedocs.io/) for more information
### Original API
Expand Down Expand Up @@ -802,15 +802,15 @@ class AlgoParams(BaseModel):
Refer to main documentation for more information.
"""

min_goal: Union[int, None]
ptype: Union[int, None]
max_load_imb: Union[int, None]
max_cpu: Union[int, None]
time_greedy: Union[int, None]
deadline: Union[int, None]
topk: Union[int, None]
swarm_size: Union[int, None]
max_mem: Union[int, None]
min_goal: Union[int, None] = None
ptype: Union[int, None] = None
max_load_imb: Union[int, None] = None
max_cpu: Union[int, None] = None
time_greedy: Union[int, None] = None
deadline: Union[int, None] = None
topk: Union[int, None] = None
swarm_size: Union[int, None] = None
max_mem: Union[int, None] = None


class KnownAlgorithms(str, Enum):
Expand Down

0 comments on commit 8b97854

Please sign in to comment.