Removed unused arguments and variables

pull/32/head
Fabio Caccamo 2017-09-29 12:12:01 +02:00
parent 66b0172195
commit 37bb3ce0df
1 changed files with 8 additions and 9 deletions

View File

@ -13,19 +13,18 @@ from colorfield.fields import ColorField
class Theme(models.Model):
@staticmethod
def post_migrate_handler(sender, **kwargs):
theme = Theme.get_active_theme()
def post_migrate_handler(**kwargs):
Theme.get_active_theme()
@staticmethod
def post_delete_handler(instance, **kwargs):
theme = Theme.get_active_theme()
def post_delete_handler(**kwargs):
Theme.get_active_theme()
@staticmethod
def post_save_handler(instance, created, **kwargs):
theme = instance
if theme.active:
Theme.objects.exclude(pk=theme.pk).update(active=False)
theme = Theme.get_active_theme()
def post_save_handler(instance, **kwargs):
if instance.active:
Theme.objects.exclude(pk=instance.pk).update(active=False)
Theme.get_active_theme()
@staticmethod
def get_active_theme():