Skip to content

Commit

Permalink
Drop pytz
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandernst committed Jul 4, 2024
1 parent 4e03421 commit eee9b8d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions django_walletpass/classviews.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import json
from calendar import timegm

from pytz.exceptions import NonExistentTimeError

import django.dispatch
from dateutil.parser import parse
from dateutil.parser import parse, ParserError
from django.db.models import Max
from django.http import HttpResponse
from django.middleware.http import ConditionalGetMiddleware
Expand Down Expand Up @@ -47,7 +45,7 @@ def list(self, request, device_library_id, pass_type_id):
# as well
date = parse(request.GET['passesUpdatedSince'])
passes = passes.filter(updated_at__gt=date)
except NonExistentTimeError:
except (ParserError, OverflowError, TypeError):
date = date.replace(hour=0, minute=0)
passes = passes.filter(updated_at__gt=date)

Expand Down

0 comments on commit eee9b8d

Please sign in to comment.