Client: 85.160.6.238
Method: POST
Path: /org/contest/c/6380/participants/new
Referrer: https://osmo.matematickaolympiada.cz/org/contest/c/6380/participants/new
Traceback (most recent call last):
File "/aux/akce/mo/osmo/venv/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
self.dialect.do_execute(
File "/aux/akce/mo/osmo/venv/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 732, in do_execute
cursor.execute(statement, parameters)
psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "users_email_key"
DETAIL: Key (email)=(matej.moravek@gymst.eu) already exists.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/aux/akce/mo/osmo/venv/lib/python3.9/site-packages/flask/app.py", line 2525, in wsgi_app
response = self.full_dispatch_request()
File "/aux/akce/mo/osmo/venv/lib/python3.9/site-packages/flask/app.py", line 1822, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/aux/akce/mo/osmo/venv/lib/python3.9/site-packages/flask/app.py", line 1820, in full_dispatch_request
rv = self.dispatch_request()
File "/aux/akce/mo/osmo/venv/lib/python3.9/site-packages/flask/app.py", line 1796, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/aux/akce/mo/osmo/venv/lib/python3.9/site-packages/mo/web/org_contest.py", line 1844, in org_contest_add_user
user, is_new_user, is_change_user_to_org = mo.users.find_or_create_user(form.email.data, form.first_name.data, form.last_name.data, False, reason='web')
File "/aux/akce/mo/osmo/venv/lib/python3.9/site-packages/mo/users.py", line 107, in find_or_create_user
sess.flush() # Aby uživatel dostal user_id
File "<string>", line 2, in flush
File "/aux/akce/mo/osmo/venv/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 3383, in flush
self._flush(objects)
File "/aux/akce/mo/osmo/venv/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 3523, in _flush
transaction.rollback(_capture_exception=True)
File "/aux/akce/mo/osmo/venv/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
compat.raise_(
File "/aux/akce/mo/osmo/venv/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 208, in raise_
raise exception
File "/aux/akce/mo/osmo/venv/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 3483, in _flush
flush_context.execute()
File "/aux/akce/mo/osmo/venv/lib/python3.9/site-packages/sqlalchemy/orm/unitofwork.py", line 456, in execute
rec.execute(self)
File "/aux/akce/mo/osmo/venv/lib/python3.9/site-packages/sqlalchemy/orm/unitofwork.py", line 630, in execute
util.preloaded.orm_persistence.save_obj(
File "/aux/akce/mo/osmo/venv/lib/python3.9/site-packages/sqlalchemy/orm/persistence.py", line 245, in save_obj
_emit_insert_statements(
File "/aux/akce/mo/osmo/venv/lib/python3.9/site-packages/sqlalchemy/orm/persistence.py", line 1238, in _emit_insert_statements
result = connection._execute_20(
File "/aux/akce/mo/osmo/venv/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1705, in _execute_20
return meth(self, args_10style, kwargs_10style, execution_options)
File "/aux/akce/mo/osmo/venv/lib/python3.9/site-packages/sqlalchemy/sql/elements.py", line 333, in _execute_on_connection
return connection._execute_clauseelement(
File "/aux/akce/mo/osmo/venv/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1572, in _execute_clauseelement
ret = self._execute_context(
File "/aux/akce/mo/osmo/venv/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1943, in _execute_context
self._handle_dbapi_exception(
File "/aux/akce/mo/osmo/venv/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 2124, in _handle_dbapi_exception
util.raise_(
File "/aux/akce/mo/osmo/venv/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 208, in raise_
raise exception
File "/aux/akce/mo/osmo/venv/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
self.dialect.do_execute(
File "/aux/akce/mo/osmo/venv/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 732, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.IntegrityError: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "users_email_key"
DETAIL: Key (email)=(matej.moravek@gymst.eu) already exists.
[SQL: INSERT INTO users (email, first_name, last_name, is_org, last_login_at, reset_at) VALUES (%(email)s, %(first_name)s, %(last_name)s, %(is_org)s, %(last_login_at)s, %(reset_at)s) RETURNING users.user_id]
[parameters: {'email': 'matej.moravek@gymst.eu', 'first_name': 'Matěj', 'last_name': 'Morávek', 'is_org': False, 'last_login_at': None, 'reset_at': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)