mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-18 00:08:31 +00:00
perf: 修改默认的邮箱地址
This commit is contained in:
21
apps/users/migrations/0046_auto_20230927_1456.py
Normal file
21
apps/users/migrations/0046_auto_20230927_1456.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# Generated by Django 4.1.10 on 2023-09-27 06:56
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
def migrate_user_default_email(apps, *args):
|
||||
user_cls = apps.get_model('users', 'User')
|
||||
user_cls.objects\
|
||||
.filter(email='admin@mycomany.com')\
|
||||
.update(email='admin@example.com')
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('users', '0045_delete_usersession'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(migrate_user_default_email),
|
||||
]
|
Reference in New Issue
Block a user