Commits

Luke Plant committed 05636b2

Fixed bug in exception handling

Comments (0)

Files changed (1)

cciw/bookings/views.py

     def get_object(self):
         try:
             return self.request.booking_account.bookings.get(id=int(self.kwargs['id']))
-        except Booking.DoesNotExist, ValueError:
+        except (ValueError, Booking.DoesNotExist):
             raise Http404
 
     def get_context_data(self, **kwargs):