Skip to content

Commit

Permalink
remove try except
Browse files Browse the repository at this point in the history
  • Loading branch information
jadmsaadaot committed Nov 9, 2023
1 parent b75df68 commit 3d0fbf1
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions epictrack-api/src/api/resources/work_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,9 @@ class IssueUpdateEdits(Resource):
@profiletime
def put(work_id, issue_id):
"""Create a new update for the specified issue."""
try:
request_dict = req.WorkIssuesUpdateSchema().load(API.payload)
work_issues = WorkIssuesService.edit_issue_update(work_id, issue_id, request_dict)
return res.WorkIssuesResponseSchema().dump(work_issues), HTTPStatus.CREATED
except Exception as e:
return jsonify({'error': str(e)}), HTTPStatus.BAD_REQUEST
request_dict = req.WorkIssuesUpdateSchema().load(API.payload)
work_issues = WorkIssuesService.edit_issue_update(work_id, issue_id, request_dict)
return res.WorkIssuesResponseSchema().dump(work_issues), HTTPStatus.CREATED


@API.route("/<int:issue_id>/issue_update", methods=["POST"])
Expand Down

0 comments on commit 3d0fbf1

Please sign in to comment.