Skip to content

Commit

Permalink
Testign dev server view error response (#2370)
Browse files Browse the repository at this point in the history
  • Loading branch information
ratheesh-aot authored Jan 31, 2024
1 parent 40fe3b9 commit e6a7470
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions met-api/src/met_api/resources/widget_poll.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""API endpoints for managing a poll widget resource."""
from http import HTTPStatus

from flask import request
from flask import jsonify, request
from flask_cors import cross_origin
from flask_restx import Namespace, Resource

Expand Down Expand Up @@ -29,10 +29,7 @@ def get(widget_id):
"""Get poll widgets."""
try:
widget_poll = WidgetPollService().get_polls_by_widget_id(widget_id)
return (
WidgetPollSchema().dump(widget_poll, many=True),
HTTPStatus.OK,
)
return jsonify(WidgetPollSchema().dump(widget_poll, many=True)), HTTPStatus.OK
except BusinessException as err:
return str(err), err.status_code

Expand Down

0 comments on commit e6a7470

Please sign in to comment.