Skip to content

Commit

Permalink
refactor: add type guard
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido committed Oct 11, 2023
1 parent a7776c3 commit 04233cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion openedx_tagging/core/tagging/rest_api/v1/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ def export(self, request, **_kwargs) -> HttpResponse:
data=request.query_params.dict()
)
query_params.is_valid(raise_exception=True)
if query_params.data.get("output_format").lower() == "json":
output_format = query_params.data.get("output_format")
assert output_format is not None
if output_format.lower() == "json":
parser_format = ParserFormat.JSON
content_type = "application/json"
else:
Expand Down

0 comments on commit 04233cb

Please sign in to comment.