We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 40f579f commit 3da16a4Copy full SHA for 3da16a4
backend/api/views/auth.py
@@ -159,7 +159,7 @@ def newregister():
159
@auth.route("/login", methods=["POST"])
160
def login():
161
data = request.json
162
- email = data.get("email")
+ email = (data.get("email") or "").strip().lower()
163
password = data.get("password")
164
role = int(data.get("role"))
165
path = data.get("path", None)
@@ -170,7 +170,7 @@ def login():
170
if not profile_model.objects(email=email):
171
profile_model = get_profile_model(Account.PARTNER)
172
173
- profile = profile_model.objects.get(email=email)
+ profile = profile_model.objects(email=email).first()
174
175
try:
176
firebase_user = firebase_client.auth().sign_in_with_email_and_password(
0 commit comments