[Update] 修改用户source默认local

pull/4107/head
Bai 2020-06-16 15:04:01 +08:00
parent f4fa011714
commit bcba408517
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 2.2.10 on 2020-06-16 07:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0026_auto_20200508_2105'),
]
operations = [
migrations.AlterField(
model_name='user',
name='source',
field=models.CharField(choices=[('local', 'Local'), ('ldap', 'LDAP/AD'), ('openid', 'OpenID'), ('radius', 'Radius'), ('cas', 'CAS')], default='local', max_length=30, verbose_name='Source'),
),
]

View File

@ -507,7 +507,7 @@ class User(AuthMixin, TokenMixin, RoleMixin, MFAMixin, AbstractUser):
max_length=30, default='', blank=True, verbose_name=_('Created by')
)
source = models.CharField(
max_length=30, default=SOURCE_LDAP, choices=SOURCE_CHOICES,
max_length=30, default=SOURCE_LOCAL, choices=SOURCE_CHOICES,
verbose_name=_('Source')
)
date_password_last_updated = models.DateTimeField(