Skip to content
Snippets Groups Projects
Commit c55f6bad authored by Todd Dembrey's avatar Todd Dembrey
Browse files

Make the fullname builder work better

parent 5548b727
No related branches found
No related tags found
No related merge requests found
......@@ -7,11 +7,11 @@ from .utils import send_activation_email
def convert_full_name_to_parts(defaults):
full_name = defaults.pop('full_name', ' ')
first_name, last_name = full_name.split(' ', 1)
first_name, *last_name = full_name.split(' ')
if first_name:
defaults.update(first_name=first_name)
if last_name:
defaults.update(last_name=last_name)
defaults.update(last_name=' '.join(last_name))
return defaults
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment