Skip to content

Commit d796a55

Browse files
Remove unnecessary external URL building for placeholder image (#450)
1 parent 59e59c9 commit d796a55

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

OpenOversight/app/main/views.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,7 @@ def officer_profile(officer_id: int):
334334
face_paths = [
335335
(
336336
None,
337-
url_for(
338-
"static", filename="images/placeholder.png", _external=True
339-
),
337+
url_for("static", filename="images/placeholder.png"),
340338
)
341339
]
342340
except Exception:

OpenOversight/tests/routes/test_officer_and_department.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,7 @@ def test_officer_appropriately_shows_placeholder(
146146
):
147147
with current_app.test_request_context():
148148
officer = Officer.query.filter(filter_func(Officer.face.any())).first()
149-
placeholder = url_for(
150-
"static", filename="images/placeholder.png", _external=True
151-
)
149+
placeholder = url_for("static", filename="images/placeholder.png")
152150

153151
rv = client.get(
154152
url_for("main.officer_profile", officer_id=officer.id),

0 commit comments

Comments
 (0)