Fix logu v přihlášce

This commit is contained in:
Jonas Havelka 2020-09-03 22:00:54 +02:00
parent 6491d63714
commit f1026c1a06

View file

@ -1202,7 +1202,7 @@ def prihlaskaView(request):
generic_logger.info("Form valid")
fcd = form.cleaned_data
form_hash = hash(frozenset(fcd.items()))
form_logger.info(fcd,form_hash) # TODO takhle log nefunguje, ale ta předchozí varianta dokonce padala
form_logger.info(str(fcd) + str(form_hash)) # TODO možná logovat jinak
with transaction.atomic():
u = User.objects.create_user(
@ -1232,7 +1232,7 @@ def prihlaskaView(request):
else:
# Unknown country - log it
msg = "Unknown country {}".format(fcd['stat_text'])
err_logger.warn(msg,form_hash) # TODO viz výše
err_logger.warn(msg + str(form_hash))
o.save()
o.user = u
@ -1250,7 +1250,7 @@ def prihlaskaView(request):
else:
# Unknown school - log it
msg = "Unknown school {}, {}".format(fcd['skola_nazev'],fcd['skola_adresa'])
err_logger.warn(msg,form_hash) # TODO viz výše
err_logger.warn(msg + str(form_hash))
r.save()