Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nk20-scripts
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BDE
nk20-scripts
Compare revisions
7479671b3f6c499958d3ad991eb54de3010f4da8 to 69c5c3bb36eb2b0554a89d369d9c157292609995
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
bde/nk20-scripts
Select target project
No results found
69c5c3bb36eb2b0554a89d369d9c157292609995
Select Git revision
Branches
borg_backup
master
merge_club
notes_report
Swap
Target
bde/nk20-scripts
Select target project
bde/nk20-scripts
1 result
7479671b3f6c499958d3ad991eb54de3010f4da8
Select Git revision
Branches
borg_backup
master
merge_club
notes_report
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (1)
Save the list of changed usernames and lost aliases
· 69c5c3bb
ynerant
authored
4 years ago
69c5c3bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
management/commands/import_account.py
+4
-17
4 additions, 17 deletions
management/commands/import_account.py
with
4 additions
and
17 deletions
management/commands/import_account.py
View file @
69c5c3bb
...
...
@@ -246,20 +246,7 @@ class Command(ImportCommand):
filename
=
kwargs
[
"
save
"
]
with
open
(
filename
,
'
w
'
)
as
fp
:
json
.
dump
(
MAP_IDBDE
,
fp
,
sort_keys
=
True
,
indent
=
2
)
for
pk_user
,
old_username
,
new_username
in
CHANGED_USERNAMES
:
user
=
User
.
objects
.
get
(
pk
=
pk_user
)
mail_text
=
render_to_string
(
"
scripts/unsupported_username.txt
"
,
dict
(
user
=
user
,
old_username
=
old_username
,
new_username
=
new_username
,
))
user
.
email_user
(
"
Transition à la Note Kfet 2020 : pseudo non supporté
"
,
mail_text
)
for
pk_user
,
aliases_list
in
CHANGED_USERNAMES
:
user
=
User
.
objects
.
get
(
pk
=
pk_user
)
mail_text
=
render_to_string
(
"
scripts/deleted_aliases.txt
"
,
dict
(
user
=
user
,
aliases_list
=
aliases_list
,
))
user
.
email_user
(
"
Transition à la Note Kfet 2020 : suppression d
'
alias
"
,
mail_text
)
with
open
(
filename
+
"
.changed-usernames
"
,
'
w
'
)
as
fp
:
json
.
dump
(
CHANGED_USERNAMES
,
fp
,
sort_keys
=
True
,
indent
=
2
)
with
open
(
filename
+
"
.removed-aliases
"
,
'
w
'
)
as
fp
:
json
.
dump
(
LOST_ALIASES
,
fp
,
sort_keys
=
True
,
indent
=
2
)
This diff is collapsed.
Click to expand it.