Skip to content
This repository was archived by the owner on Aug 26, 2024. It is now read-only.

Commit d605bf0

Browse files
author
Apache
committed
fix 500
1 parent da4689e commit d605bf0

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

suborg/views.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,13 @@ def accept_application(request, application_id):
150150
except Exception:
151151
pass
152152
except User.DoesNotExist:
153-
RegLink.objects.create(
154-
user_role=1,
155-
user_suborg=suborg,
156-
gsoc_year=gsoc_year,
157-
email=email
158-
)
153+
if email is not None:
154+
RegLink.objects.create(
155+
user_role=1,
156+
user_suborg=suborg,
157+
gsoc_year=gsoc_year,
158+
email=email
159+
)
159160

160161
return redirect(reverse("admin:gsoc_suborgdetails_change", args=[application_id]))
161162

0 commit comments

Comments
 (0)