Skip to content

Commit

Permalink
fix minor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-goeldi committed Mar 7, 2024
1 parent 389d2ac commit e3563cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions src/kweb/api/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ async def gds_view_static(
gds_file = (settings.fileslocation / f"{gds_name}").with_suffix(".gds")

exists = (
gds_file.exists()
and gds_file.is_file()
and gds_file.stat().st_mode # type: ignore[misc, operator]
gds_file.is_file()
and gds_file.stat().st_mode
)

if not exists:
Expand All @@ -51,9 +50,8 @@ async def file_view_static(
file = settings.fileslocation / f"{file_name}"

exists = (
file.exists()
and file.is_file()
and file.stat().st_mode # type: ignore[misc, operator]
file.is_file()
and file.stat().st_mode
)

if not exists:
Expand Down
2 changes: 1 addition & 1 deletion src/kweb/templates/browser.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<div class="container-fluid w-100 overflow-scroll" id="files-panel">
{% for file in folder_files %}
<div class="d-flex flex-row p-2">
<a href={{ url_for("file_view_static", filename=file }} class="btn btn-primary text-start">{{ file }}</a>
<a href={{ url_for("file_view_static", file_name=file) }} class="btn btn-primary text-start">{{ file }}</a>
</div>
{% endfor %}
</div>
Expand Down

0 comments on commit e3563cc

Please sign in to comment.