|
@@ -34,7 +34,7 @@ def subscription_count_json(request):
|
|
date = request.GET.get('date', datetime.date.today())
|
|
date = request.GET.get('date', datetime.date.today())
|
|
|
|
|
|
# Validate date type
|
|
# Validate date type
|
|
- if type(date) is not datetime.date:
|
|
|
|
|
|
+ if not isinstance(date, datetime.date):
|
|
try:
|
|
try:
|
|
datetime.datetime.strptime(date, '%Y-%m-%d')
|
|
datetime.datetime.strptime(date, '%Y-%m-%d')
|
|
except ValueError, TypeError:
|
|
except ValueError, TypeError:
|