0001-use-get_user_model-in-clean-unused-account-command-f.patch
src/authentic2/management/commands/clean-unused-accounts.py | ||
---|---|---|
2 | 2 |
import logging |
3 | 3 |
import datetime |
4 | 4 | |
5 |
from django.contrib.auth.models import User
|
|
5 |
from django.contrib.auth import get_user_model
|
|
6 | 6 |
from django.core.management.base import BaseCommand, CommandError |
7 | 7 |
from django.core.mail import send_mail |
8 | 8 |
from django.utils.timezone import now |
... | ... | |
74 | 74 |
self.from_email = options['from_email'] |
75 | 75 |
if self.fake: |
76 | 76 |
log.info('fake call to clean-unused-accounts') |
77 |
users = User.objects.all()
|
|
77 |
users = get_user_model().objects.all()
|
|
78 | 78 |
if options['filter']: |
79 | 79 |
for f in options['filter']: |
80 | 80 |
key, value = f.split('=', 1) |
81 |
- |