Skip to content

Commit

Permalink
Remove unnecessary external URL building for placeholder image (#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
AetherUnbound authored Jun 2, 2024
1 parent 59e59c9 commit d796a55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions OpenOversight/app/main/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,7 @@ def officer_profile(officer_id: int):
face_paths = [
(
None,
url_for(
"static", filename="images/placeholder.png", _external=True
),
url_for("static", filename="images/placeholder.png"),
)
]
except Exception:
Expand Down
4 changes: 1 addition & 3 deletions OpenOversight/tests/routes/test_officer_and_department.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ def test_officer_appropriately_shows_placeholder(
):
with current_app.test_request_context():
officer = Officer.query.filter(filter_func(Officer.face.any())).first()
placeholder = url_for(
"static", filename="images/placeholder.png", _external=True
)
placeholder = url_for("static", filename="images/placeholder.png")

rv = client.get(
url_for("main.officer_profile", officer_id=officer.id),
Expand Down

0 comments on commit d796a55

Please sign in to comment.