diff --git a/helpdesk/models.py b/helpdesk/models.py index b3feb8d0..505b3cba 100644 --- a/helpdesk/models.py +++ b/helpdesk/models.py @@ -11,6 +11,7 @@ from django.db import models from django.contrib.auth import get_user_model from django.conf import settings from django.utils.translation import ugettext_lazy as _, ugettext +from django import VERSION try: from django.utils import timezone @@ -1043,7 +1044,7 @@ def create_usersettings(sender, instance, created, **kwargs): try: # Connecting via settings.AUTH_USER_MODEL (string) fails in Django < 1.7. We need the actual model there. # https://docs.djangoproject.com/en/1.7/topics/auth/customizing/#referencing-the-user-model - if django.VERSION < (1, 7): + if VERSION < (1, 7): raise ValueError models.signals.post_save.connect(create_usersettings, sender=settings.AUTH_USER_MODEL) except: