Merge pull request #63 from codersquid/flake8scheduleform

flake8 fixes for the schedule edit form.
This commit is contained in:
Sheila Miguez 2014-09-27 12:27:15 -05:00
commit a4c4e6953c

View file

@ -1,9 +1,15 @@
import csv
import time
from datetime import datetime
from django import forms
from django.contrib import messages
from django.db import IntegrityError
from django.db.models import Q
from markitup.widgets import MarkItUpWidget
from symposion.schedule.models import Presentation
from symposion.schedule.models import (Day, Presentation, Room, SlotKind, Slot, SlotRoom)
class SlotEditForm(forms.Form):
@ -139,7 +145,9 @@ class ScheduleSectionForm(forms.Form):
)
created_items.append(slot)
try:
with transaction.atomic():
# @@@ TODO - upgrade Django, use atomic transactions
# with transaction.atomic():
# SlotRoom.objects.create(slot=slot, room=room)
SlotRoom.objects.create(slot=slot, room=room)
except IntegrityError:
# delete all created objects and report error