Skip to content

Commit

Permalink
Revert "Update views.py"
Browse files Browse the repository at this point in the history
This reverts commit 013f4bb.
  • Loading branch information
michplunkett committed Dec 20, 2024
1 parent 0bacc74 commit 112fd35
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions OpenOversight/app/main/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1681,17 +1681,7 @@ def download_incidents_csv(department_id: int):
cache_params = (Department(id=department_id), KEY_DEPT_ALL_INCIDENTS)
incidents = get_database_cache_entry(*cache_params)
if incidents is None:
incidents = (
Incident.query.options(
joinedload(Incident.address),
joinedload(Incident.license_plates),
joinedload(Incident.links),
joinedload(Incident.officers),
)
.filter_by(department_id=department_id)
.all()
)

incidents = Incident.query.filter_by(department_id=department_id).all()
put_database_cache_entry(*cache_params, incidents)

field_names = [
Expand Down

0 comments on commit 112fd35

Please sign in to comment.