Don't connect Theme.get_active() to post_migrate()
This fixes an IntegrityError when trying to import or load for the first time another Themepull/27/head
parent
74d7dd12bf
commit
948f0ae7ea
|
|
@ -1,7 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from django.apps import AppConfig
|
||||
from django.db.models.signals import post_migrate
|
||||
|
||||
|
||||
class AdminInterfaceConfig(AppConfig):
|
||||
|
|
@ -10,7 +9,5 @@ class AdminInterfaceConfig(AppConfig):
|
|||
verbose_name = 'Admin Interface'
|
||||
|
||||
def ready(self):
|
||||
|
||||
from admin_interface.models import Theme
|
||||
post_migrate.connect(Theme.post_migrate_handler, sender = self)
|
||||
pass
|
||||
|
||||
|
|
|
|||
|
|
@ -12,10 +12,6 @@ from colorfield.fields import ColorField
|
|||
@python_2_unicode_compatible
|
||||
class Theme(models.Model):
|
||||
|
||||
@staticmethod
|
||||
def post_migrate_handler(sender, **kwargs):
|
||||
Theme.get_active_theme()
|
||||
|
||||
@staticmethod
|
||||
def post_delete_handler(instance, **kwargs):
|
||||
Theme.get_active_theme()
|
||||
|
|
|
|||
Loading…
Reference in New Issue