Skip to content

Commit

Permalink
Update views.py
Browse files Browse the repository at this point in the history
  • Loading branch information
michplunkett committed Jul 21, 2024
1 parent 33bfef9 commit 5ff8d4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions OpenOversight/app/main/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1521,8 +1521,8 @@ def submit_data():
preferred_dept_id = Department.query.first().id
# try to use preferred department if available
try:
if db.session.get(User, current_user.id).dept_pref:
preferred_dept_id = db.session.get(User, current_user.id).dept_pref
if current_user.dept_pref:
preferred_dept_id = current_user.dept_pref
form = AddImageForm()
else:
form = AddImageForm()
Expand Down

0 comments on commit 5ff8d4e

Please sign in to comment.