From 76fdf073eecee552e772503fa9d674025d4bcb3d Mon Sep 17 00:00:00 2001 From: pinwheeeel Date: Sat, 28 Sep 2024 19:42:52 -0400 Subject: [PATCH] qol changes to add_clubs --- core/management/commands/add_clubs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/management/commands/add_clubs.py b/core/management/commands/add_clubs.py index 6c578197..634ce5c3 100644 --- a/core/management/commands/add_clubs.py +++ b/core/management/commands/add_clubs.py @@ -87,6 +87,7 @@ def handle(self, *args, **options): continue self.success(f"New organization: {row[0]}") + row = [token.strip() for token in row] ( organization_name, _, @@ -166,7 +167,7 @@ def handle(self, *args, **options): def get_user_by_email(self, name: str, email: str) -> User | Status: try: - return User.objects.get(email=email) + return User.objects.get(email__iexact=email) except User.DoesNotExist: self.error( f"\t{name}'s email ({email}) not found! Are you sure they registered a metro account with this email?"