Don't check dictionaries blindly
This commit is contained in:
@@ -41,7 +41,7 @@ def create_superuser_and_anonymous_user(sender, **kwargs):
|
|||||||
|
|
||||||
Create our own admin super user automatically.
|
Create our own admin super user automatically.
|
||||||
"""
|
"""
|
||||||
if kwargs['app'] == 'common':
|
if kwargs.get('app') == 'common':
|
||||||
AutoAdminSingleton.objects.get_or_create()
|
AutoAdminSingleton.objects.get_or_create()
|
||||||
AnonymousUserSingleton.objects.get_or_create()
|
AnonymousUserSingleton.objects.get_or_create()
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ from .models import Installation
|
|||||||
|
|
||||||
|
|
||||||
def create_installation_instance(sender, **kwargs):
|
def create_installation_instance(sender, **kwargs):
|
||||||
if kwargs['app'] == 'installation':
|
if kwargs.get('app') == 'installation':
|
||||||
Installation.objects.get_or_create()
|
Installation.objects.get_or_create()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user