Skip to content

Commit

Permalink
Merge branch 'fbl-integration' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
aottr authored Apr 8, 2024
2 parents 7193520 + 8a3ca15 commit 085a145
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fbl_integration/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import requests
from django.conf import settings
from core.utils.general import sainitize_username
from .models import FblAccount

def fbl_auth_request_code(badge_number: int, dob: str) -> bool:
Expand Down Expand Up @@ -44,7 +45,8 @@ def get_or_create_account(account_info: dict[str, str]) -> FblAccount:
return user

# Create new user with (generic) username
user = FblAccount.create_user(account_info["username"])
clean_username = sainitize_username(account_info["username"])
user = FblAccount.create_user(clean_username)
return FblAccount.objects.create(
user=user,
badge_number=account_info["badge"],
Expand Down

0 comments on commit 085a145

Please sign in to comment.