Skip to content

Commit

Permalink
Views: Modify conditional for job_type grabbing in job start
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan Puerto committed Feb 15, 2024
1 parent 908dc9f commit 03fef1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/user_workspaces_server/views/workspace_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def put(self, request, workspace_id, put_type=None):
except Exception as e:
raise ParseError(f"Invalid JSON: {str(e)}")

if (job_type := body.get("job_type")) is None:
if not (job_type := body.get("job_type")):
if not workspace.default_job_type:
raise ParseError("Missing job_type and no default job type set on workspace.")
else:
Expand Down

0 comments on commit 03fef1e

Please sign in to comment.