Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_queryset(self):
try:
if self.kwargs['cal_slug']:
return EventTime.upcoming_objects.filter(event__calendar__slug=self.kwargs['cal_slug'])
except:
pass
try:
if self.kwargs['slug']:
return EventTime.upcoming_objects.filter(event__slug=self.kwargs['slug'])
except:
return EventTime.upcoming_objects.all()