Skip to content

Commit

Permalink
Use django_settings.SITE_ID instead of Site.objects.get_current().
Browse files Browse the repository at this point in the history
  • Loading branch information
uri-rodberg committed Jan 16, 2019
1 parent 2c5b5f9 commit 6570e00
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions speedy/core/accounts/test/user_factories.py
@@ -1,12 +1,10 @@
from django.conf import settings as django_settings
from django.contrib.sites.models import Site


if (django_settings.LOGIN_ENABLED):
site = Site.objects.get_current()
if (site.id == django_settings.SPEEDY_NET_SITE_ID):
if (django_settings.SITE_ID == django_settings.SPEEDY_NET_SITE_ID):
from speedy.net.accounts.test.user_factories import DefaultUserFactory, InactiveUserFactory, ActiveUserFactory
if (site.id == django_settings.SPEEDY_MATCH_SITE_ID):
if (django_settings.SITE_ID == django_settings.SPEEDY_MATCH_SITE_ID):
from speedy.match.accounts.test.user_factories import DefaultUserFactory, InactiveUserFactory, ActiveUserFactory


0 comments on commit 6570e00

Please sign in to comment.