Skip to content

Commit

Permalink
Merge pull request #950 from EdwardBetts/username_no_length
Browse files Browse the repository at this point in the history
username max_length can be None
  • Loading branch information
omab authored Jul 17, 2016
2 parents 2bcd91d + f1716dc commit fa2fd33
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion social/pipeline/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ def get_username(strategy, details, user=None, *args, **kwargs):
else:
username = uuid4().hex

short_username = username[:max_length - uuid_length]
short_username = (username[:max_length - uuid_length]
if max_length is not None
else username)
final_username = slug_func(clean_func(username[:max_length]))

# Generate a unique username for current user using username
Expand Down

0 comments on commit fa2fd33

Please sign in to comment.