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,13 +5,12 @@ from south.signals import post_migrate
from project_tools.api import register_tool
from django.dispatch import receiver
from django.db.models.signals import post_save
from django.db.utils import DatabaseError
from django.db import transaction
from .links import installation_details
from .models import Installation
@receiver(post_migrate, dispatch_uid='trigger_first_time')
def trigger_first_time(sender, **kwargs):
@@ -27,7 +26,7 @@ def check_first_run():
details = Installation.objects.get()
except DatabaseError:
# Avoid database errors when the app tables haven't been created yet
transaction.rollback()
transaction.rollback()
else:
if details.is_first_run:
details.submit()