Browse Source

Be more pythonic

opi 8 years ago
parent
commit
6639c8d17e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      coin/offers/views.py

+ 1 - 1
coin/offers/views.py

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