|
@@ -114,8 +114,8 @@ def weeklyreportlist(request):
|
|
|
|
|
|
def report_by_date_range(requests, location_id):
|
|
|
location = Location.objects.get(pk=location_id)
|
|
|
- start_date = requests.GET['start_date']
|
|
|
- end_date = requests.GET['end_date']
|
|
|
+ start_date = requests.GET.get('start_date')
|
|
|
+ end_date = requests.GET.get('end_date')
|
|
|
if start_date:
|
|
|
start_date = make_aware(datetime.strptime(start_date, "%Y-%m-%d"))
|
|
|
else:
|