We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6b5bac5 commit 2e1ce3eCopy full SHA for 2e1ce3e
1 file changed
home/views.py
@@ -480,13 +480,16 @@ def profile(request):
480
if request.method == "POST" and request.user.is_authenticated:
481
if student:
482
try:
483
- print(request.FILES)
+ logger.debug(request.FILES)
484
file = request.FILES["profile-picture"]
485
student.photo = file
486
student.save()
487
except Exception as e:
488
logger.error(e)
489
- return redirect(request.path)
+ if url_has_allowed_host_and_scheme(request.path, allowed_hosts=None):
490
+ return redirect(request.path)
491
+ else:
492
+ return redirect("/")
493
text = ""
494
socialaccount_obj = SocialAccount.objects.filter(
495
provider="google", user_id=request.user.id
0 commit comments