Handle exceptions raised if the DB does not yet exist
This commit is contained in:
parent
c16989d006
commit
f14fdd6f93
1 changed files with 2 additions and 2 deletions
|
@ -25,7 +25,7 @@ import pdb
|
||||||
from django.core.management.base import BaseCommand
|
from django.core.management.base import BaseCommand
|
||||||
|
|
||||||
from django.contrib.auth.models import User, Group
|
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 pinaxcon.registrasion.models import AttendeeProfile
|
||||||
from registrasion.controllers.cart import CartController
|
from registrasion.controllers.cart import CartController
|
||||||
from registrasion.controllers.invoice import InvoiceController
|
from registrasion.controllers.invoice import InvoiceController
|
||||||
|
@ -129,7 +129,7 @@ def set_colour(soup, slice_id, colour):
|
||||||
try:
|
try:
|
||||||
Volunteers = Group.objects.filter(name='Conference volunteers').first().user_set.all()
|
Volunteers = Group.objects.filter(name='Conference volunteers').first().user_set.all()
|
||||||
Organisers = Group.objects.filter(name='Conference organisers').first().user_set.all()
|
Organisers = Group.objects.filter(name='Conference organisers').first().user_set.all()
|
||||||
except (OperationalError, AttributeError):
|
except (OperationalError, AttributeError, ProgrammingError):
|
||||||
Volunteers = []
|
Volunteers = []
|
||||||
Organisers = []
|
Organisers = []
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue