From f14fdd6f93c40e13d753a22feeb9281adc2f9e56 Mon Sep 17 00:00:00 2001 From: James Polley Date: Sun, 10 Jun 2018 19:05:07 +1000 Subject: [PATCH] Handle exceptions raised if the DB does not yet exist --- vendor/registrasion/registrasion/contrib/badger.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/registrasion/registrasion/contrib/badger.py b/vendor/registrasion/registrasion/contrib/badger.py index b00f01ea..15f9bf6d 100644 --- a/vendor/registrasion/registrasion/contrib/badger.py +++ b/vendor/registrasion/registrasion/contrib/badger.py @@ -25,7 +25,7 @@ import pdb from django.core.management.base import BaseCommand from django.contrib.auth.models import User, Group -from django.db.utils import OperationalError +from django.db.utils import OperationalError, ProgrammingError from pinaxcon.registrasion.models import AttendeeProfile from registrasion.controllers.cart import CartController from registrasion.controllers.invoice import InvoiceController @@ -129,7 +129,7 @@ def set_colour(soup, slice_id, colour): try: Volunteers = Group.objects.filter(name='Conference volunteers').first().user_set.all() Organisers = Group.objects.filter(name='Conference organisers').first().user_set.all() -except (OperationalError, AttributeError): +except (OperationalError, AttributeError, ProgrammingError): Volunteers = [] Organisers = []