Skip to content

Commit

Permalink
bugfix: return 'values' from 'Uses' model rootvalidator
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandf committed Oct 10, 2023
1 parent 7ba0b9a commit 1fd9e1a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api/src/backend/views/http/requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,8 @@ class Uses(BaseModel):
def must_provide_name_or_path(cls, values):
if values.get("name", None) == None and values.get("path", None) == None:
raise ValueError("The 'uses' property of a Template Task must specify either a 'name' or 'path' property")

return values

class BaseTask(BaseModel):
id: ID
Expand Down

0 comments on commit 1fd9e1a

Please sign in to comment.