Skip to content

Commit

Permalink
Merged in OP-447 (pull request #175)
Browse files Browse the repository at this point in the history
OP-447: bug fix for reports max_date_received query
  • Loading branch information
estevez90 committed Dec 23, 2015
2 parents 2138f98 + 2d98040 commit 146121e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public_records_portal/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1448,7 +1448,7 @@ def get_report_jsons(calendar_filter, report_type, agency_filter, staff_filter):
d_string = date_now.strftime(date_format)
d_string_2 = date_start_of_year.strftime(date_format)
min_date_received = str(datetime.strptime(d_string_2, date_format))
max_date_received = str(datetime.strptime(d_string, date_format))
max_date_received = str(datetime.strptime(d_string, date_format) + timedelta(days=1))
min_date_received = min_date_received[0:-9]
max_date_received = max_date_received[0:-9]
received_request = received_request.filter(and_(models.Request.date_received >= min_date_received,
Expand All @@ -1472,7 +1472,7 @@ def get_report_jsons(calendar_filter, report_type, agency_filter, staff_filter):
date_now = datetime.now()
d_string = date_now.strftime(date_format)
min_date_received = str(datetime.strptime(d_string, date_format) - timedelta(365))
max_date_received = str(datetime.strptime(d_string, date_format))
max_date_received = str(datetime.strptime(d_string, date_format) + timedelta(days=1))
min_date_received = min_date_received[0:-9]
max_date_received = max_date_received[0:-9]
received_request = received_request.filter(and_(models.Request.date_received >= min_date_received,
Expand Down

0 comments on commit 146121e

Please sign in to comment.