Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mentors.debian.net
debexpo
Commits
7e0f2d08
Verified
Commit
7e0f2d08
authored
Aug 29, 2021
by
Baptiste Beauplat
Browse files
Remove Profile validation code in create_user command (Profile validation can't fail)
parent
866b0e61
Pipeline
#282397
passed with stage
in 32 minutes and 18 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
debexpo/accounts/management/commands/create_user.py
View file @
7e0f2d08
...
@@ -61,11 +61,6 @@ class Command(BaseCommand):
...
@@ -61,11 +61,6 @@ class Command(BaseCommand):
except
ValidationError
as
e
:
except
ValidationError
as
e
:
raise
CommandError
(
f
'Failed to create a new user:
{
str
(
e
)
}
'
)
raise
CommandError
(
f
'Failed to create a new user:
{
str
(
e
)
}
'
)
new_profile
=
None
new_profile
=
Profile
(
user
=
new_user
)
try
:
new_profile
=
Profile
(
user
=
new_user
)
new_profile
.
save
()
new_profile
.
full_clean
()
except
ValidationError
as
e
:
raise
CommandError
(
f
'Failed to create a new user profile:
{
str
(
e
)
}
'
)
else
:
new_profile
.
save
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment