Import and PEP8 cleanups

This commit is contained in:
Roberto Rosario
2012-07-26 22:42:36 -04:00
parent 24bf20b9d7
commit eecf7c7751
69 changed files with 173 additions and 253 deletions

View File

@@ -5,7 +5,6 @@ import json
from django.db import transaction
from django.core import serializers
from django.shortcuts import get_object_or_404
from django.db import models
from django.db.utils import DatabaseError
@@ -17,7 +16,7 @@ class EventNamespace(object):
def __init__(self, name, label):
self.name = name
self.label = label
class Event(object):
@transaction.commit_on_success
@@ -37,8 +36,7 @@ class Event(object):
history_types_dict[self.namespace.name][self.name] = self
except DatabaseError:
# Special case for syncdb
transaction.rollback()
transaction.rollback()
def commit(self, source_object=None, data=None):
new_history = History(history_type=self.history_type_obj)