0001-misc-send-unused-account-alerts-using-translations-4.patch
src/authentic2/management/commands/clean-unused-accounts.py | ||
---|---|---|
23 | 23 |
from django.core.management.base import BaseCommand |
24 | 24 |
from django.db.transaction import atomic |
25 | 25 |
from django.db.models import F |
26 |
from django.utils import timezone |
|
26 |
from django.utils import timezone,translation
|
|
27 | 27 |
from django.utils.six.moves.urllib import parse as urlparse |
28 | 28 |
from django_rbac.utils import get_ou_model |
29 | 29 | |
... | ... | |
61 | 61 |
logger.propagate = False |
62 | 62 | |
63 | 63 |
self.now = timezone.now() |
64 |
translation.activate(settings.LANGUAGE_CODE) |
|
64 | 65 |
try: |
65 | 66 |
self.clean_unused_accounts() |
66 | 67 |
except Exception: |
67 |
- |