You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ich habe in letzter Zeit (24.7. bzw. 13.8.) zwei unhandled exceptions via Mail bekommen, die ich mir nicht erklären kann. Bei beiden heisst es nach einem POST auf http://studentenportal.ch/accounts/register/:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/django/db/backends/utils.py", line 84, in _executereturnself.cursor.execute(sql, params)
The above exception (duplicate key value violates unique constraint "front_user_username_key"
DETAIL: Key (username)=(redacted.redacted) already exists.
) was the direct cause of the following exception:
File "/usr/local/lib/python3.7/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python3.7/site-packages/django/views/generic/base.py", line 70, in viewreturnself.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/django/utils/decorators.py", line 43, in _wrapperreturn bound_method(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/django/views/decorators/debug.py", line 89, in sensitive_post_parameters_wrapperreturn view(request, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/registration/views.py", line 53, in dispatchreturnsuper().dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/django/views/generic/base.py", line 98, in dispatchreturn handler(request, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/django/views/generic/edit.py", line 142, in postreturnself.form_valid(form)
File "/usr/local/lib/python3.7/site-packages/registration/views.py", line 56, in form_valid
new_user =self.register(form)
File "/usr/local/lib/python3.7/site-packages/registration/backends/default/views.py", line 100, in register
request=self.request,
File "/usr/local/lib/python3.7/site-packages/registration/models.py", line 184, in create_inactive_user
new_user.save()
File "/usr/local/lib/python3.7/site-packages/django/contrib/auth/base_user.py", line 67, in savesuper().save(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/django/db/models/base.py", line 740, in save
force_update=force_update, update_fields=update_fields)
File "/usr/local/lib/python3.7/site-packages/django/db/models/base.py", line 778, in save_base
force_update, using, update_fields,
File "/usr/local/lib/python3.7/site-packages/django/db/models/base.py", line 881, in _save_table
results =self._do_insert(cls._base_manager, using, fields, returning_fields, raw)
File "/usr/local/lib/python3.7/site-packages/django/db/models/base.py", line 921, in _do_insert
using=using, raw=raw,
File "/usr/local/lib/python3.7/site-packages/django/db/models/manager.py", line 85, in manager_methodreturngetattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/django/db/models/query.py", line 1270, in _insertreturn query.get_compiler(using=using).execute_sql(returning_fields)
File "/usr/local/lib/python3.7/site-packages/django/db/models/sql/compiler.py", line 1416, in execute_sql
cursor.execute(sql, params)
File "/usr/local/lib/python3.7/site-packages/django/db/backends/utils.py", line 66, in executereturnself._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/usr/local/lib/python3.7/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappersreturn executor(sql, params, many, context)
File "/usr/local/lib/python3.7/site-packages/django/db/backends/utils.py", line 84, in _executereturnself.cursor.execute(sql, params)
File "/usr/local/lib/python3.7/site-packages/django/db/utils.py", line 90, in __exit__raise dj_exc_value.with_traceback(traceback) from exc_value
File "/usr/local/lib/python3.7/site-packages/django/db/backends/utils.py", line 84, in _executereturnself.cursor.execute(sql, params)
Exception Type: IntegrityError at /accounts/register/
Exception Value: duplicate key value violates unique constraint "front_user_username_key"
DETAIL: Key (username)=(redacted.redacted) already exists.
raiseforms.ValidationError("Benutzer mit dieser E-Mail existiert bereits.")
und ich kann das Problem auch nicht reproduzieren - mit denselben Daten wie im Mail kriege ich wie erwartet direkt im Browser eine Meldung. Der User existiert tatsächlich mit der exakt selben Mail schon in der Datenbank.
@dbrgn du hast die Validierung damals™ in b6c0c77 implementiert - kannst du dir da irgend nen Reim daraus machen?
The text was updated successfully, but these errors were encountered:
Beim Check wird die E-Mail geprüft, bei der Fehlermeldung geht es um den Username. Der wird irgendwie von der E-Mail abgeleitet, oder? Ev gibt's User, wo der Username nicht (mehr) zur E-Mail passt.
Ich habe in letzter Zeit (24.7. bzw. 13.8.) zwei unhandled exceptions via Mail bekommen, die ich mir nicht erklären kann. Bei beiden heisst es nach einem POST auf http://studentenportal.ch/accounts/register/:
aber wir fangen das eigentlich schon ab:
web/apps/front/forms.py
Lines 48 to 50 in f44e535
und ich kann das Problem auch nicht reproduzieren - mit denselben Daten wie im Mail kriege ich wie erwartet direkt im Browser eine Meldung. Der User existiert tatsächlich mit der exakt selben Mail schon in der Datenbank.
@dbrgn du hast die Validierung damals™ in b6c0c77 implementiert - kannst du dir da irgend nen Reim daraus machen?
The text was updated successfully, but these errors were encountered: