mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 07:21:13 -05:00
Merge pull request #881 from GSA/debug_staging
return None to handle new user
This commit is contained in:
@@ -36,7 +36,6 @@ def get_login_gov_user(login_uuid, email_address):
|
||||
should be removed.
|
||||
"""
|
||||
|
||||
print(User.query.filter_by(login_uuid=login_uuid).first())
|
||||
user = User.query.filter_by(login_uuid=login_uuid).first()
|
||||
if user:
|
||||
if user.email_address != email_address:
|
||||
|
||||
@@ -566,6 +566,9 @@ def get_user_login_gov_user():
|
||||
login_uuid = request_args["login_uuid"]
|
||||
email = request_args["email"]
|
||||
user = get_login_gov_user(login_uuid, email)
|
||||
|
||||
if user is None:
|
||||
return jsonify({})
|
||||
result = user.serialize()
|
||||
return jsonify(data=result)
|
||||
|
||||
@@ -715,9 +718,9 @@ def get_orgs_and_services(user):
|
||||
"id": service.id,
|
||||
"name": service.name,
|
||||
"restricted": service.restricted,
|
||||
"organization": service.organization.id
|
||||
if service.organization
|
||||
else None,
|
||||
"organization": (
|
||||
service.organization.id if service.organization else None
|
||||
),
|
||||
}
|
||||
for service in user.services
|
||||
if service.active
|
||||
|
||||
Reference in New Issue
Block a user