Skip to content

Commit

Permalink
Fix officer profile exception (#385)
Browse files Browse the repository at this point in the history
  • Loading branch information
sea-kelp authored Nov 26, 2023
1 parent 38bf2c0 commit a9ac755
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion OpenOversight/app/main/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ def officer_profile(officer_id: int):
form = AssignmentForm()
try:
officer = Officer.query.filter_by(id=officer_id).one()
officer.incidents.query.order_by(Incident.date.desc(), Incident.time.desc())
except NoResultFound:
abort(HTTPStatus.NOT_FOUND)
except Exception:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ <h3>Incidents</h3>
{% if officer.incidents %}
<table class="table table-hover table-responsive">
<tbody>
{% for incident in officer.incidents %}
{% for incident in officer.incidents | sort(attribute='date') | reverse %}
{% if not loop.first %}
<tr class="border:none">
<td colspan="2">&nbsp;</td>
Expand Down

0 comments on commit a9ac755

Please sign in to comment.