Skip to content

Commit

Permalink
backend: fix mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nikromen committed Apr 28, 2024
1 parent 0db4f56 commit 1aa30e4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions backend/src/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ class OkResponse(BaseModel):


def _store_data_for_providers(
feedback_input: FeedbackInputSchema, provider: ProvidersEnum, id_: int | str, *args
feedback_input: FeedbackInputSchema, provider: str, id_: int | str, *args
) -> OkResponse:
storator = Storator3000(provider, id_)
storator = Storator3000(ProvidersEnum[provider], id_)

if provider == ProvidersEnum.container:
result_to_store = schema_inp_to_out(feedback_input, is_with_spec=False)
Expand Down Expand Up @@ -304,9 +304,8 @@ def iter_large_file(file_name: Path):
return StreamingResponse(
iter_large_file(_tar_path),
media_type="application/x-tar",
# TODO: https://github.com/fedora-copr/log-detective-website/issues/63
headers={
"Content-Disposition": f"attachment; filename={_tar_path.name}", # noqa: E702
"Content-Disposition": f"attachment; filename={_tar_path.name}",
"Content-Length": str(_tar_path.stat().st_size),
},
)
Expand Down

0 comments on commit 1aa30e4

Please sign in to comment.