lookupproxy_1 | Internal Server Error: /institutions
lookupproxy_1 | Traceback (most recent call last):
lookupproxy_1 | File "/usr/src/app/lookupapi/authentication.py", line 83, in authenticate
lookupproxy_1 | user = get_user_model().objects.get(username=subject)
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/manager.py", line 82, in manager_method
lookupproxy_1 | return getattr(self.get_queryset(), name)(*args, **kwargs)
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py", line 403, in get
lookupproxy_1 | self.model._meta.object_name
lookupproxy_1 | django.contrib.auth.models.DoesNotExist: User matching query does not exist.
lookupproxy_1 |
lookupproxy_1 | During handling of the above exception, another exception occurred:
lookupproxy_1 |
lookupproxy_1 | Traceback (most recent call last):
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py", line 85, in _execute
lookupproxy_1 | return self.cursor.execute(sql, params)
lookupproxy_1 | psycopg2.IntegrityError: duplicate key value violates unique constraint "auth_user_username_key"
lookupproxy_1 | DETAIL: Key (username)=(mock:test0012) already exists.
lookupproxy_1 |
lookupproxy_1 |
lookupproxy_1 | The above exception was the direct cause of the following exception:
lookupproxy_1 |
lookupproxy_1 | Traceback (most recent call last):
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
lookupproxy_1 | response = get_response(request)
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 128, in _get_response
lookupproxy_1 | response = self.process_exception_by_middleware(e, request)
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response
lookupproxy_1 | response = wrapped_callback(request, *callback_args, **callback_kwargs)
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
lookupproxy_1 | return view_func(*args, **kwargs)
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/django/views/generic/base.py", line 69, in view
lookupproxy_1 | return self.dispatch(request, *args, **kwargs)
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py", line 494, in dispatch
lookupproxy_1 | response = self.handle_exception(exc)
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py", line 454, in handle_exception
lookupproxy_1 | self.raise_uncaught_exception(exc)
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py", line 482, in dispatch
lookupproxy_1 | self.initial(request, *args, **kwargs)
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py", line 399, in initial
lookupproxy_1 | self.perform_authentication(request)
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py", line 325, in perform_authentication
lookupproxy_1 | request.user
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/rest_framework/request.py", line 222, in user
lookupproxy_1 | self._authenticate()
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/rest_framework/request.py", line 374, in _authenticate
lookupproxy_1 | user_auth_tuple = authenticator.authenticate(self)
lookupproxy_1 | File "/usr/src/app/lookupapi/authentication.py", line 85, in authenticate
lookupproxy_1 | user = get_user_model().objects.create_user(username=subject)
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/django/contrib/auth/models.py", line 150, in create_user
lookupproxy_1 | return self._create_user(username, email, password, **extra_fields)
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/django/contrib/auth/models.py", line 144, in _create_user
lookupproxy_1 | user.save(using=self._db)
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/django/contrib/auth/base_user.py", line 73, in save
lookupproxy_1 | super().save(*args, **kwargs)
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/base.py", line 729, in save
lookupproxy_1 | force_update=force_update, update_fields=update_fields)
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/base.py", line 759, in save_base
lookupproxy_1 | updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/base.py", line 842, in _save_table
lookupproxy_1 | result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/base.py", line 880, in _do_insert
lookupproxy_1 | using=using, raw=raw)
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/manager.py", line 82, in manager_method
lookupproxy_1 | return getattr(self.get_queryset(), name)(*args, **kwargs)
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py", line 1125, in _insert
lookupproxy_1 | return query.get_compiler(using=using).execute_sql(return_id)
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1281, in execute_sql
lookupproxy_1 | cursor.execute(sql, params)
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py", line 100, in execute
lookupproxy_1 | return super().execute(sql, params)
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py", line 68, in execute
lookupproxy_1 | return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py", line 77, in _execute_with_wrappers
lookupproxy_1 | return executor(sql, params, many, context)
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py", line 85, in _execute
lookupproxy_1 | return self.cursor.execute(sql, params)
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/django/db/utils.py", line 89, in __exit__
lookupproxy_1 | raise dj_exc_value.with_traceback(traceback) from exc_value
lookupproxy_1 | File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py", line 85, in _execute
lookupproxy_1 | return self.cursor.execute(sql, params)
lookupproxy_1 | django.db.utils.IntegrityError: duplicate key value violates unique constraint "auth_user_username_key"
lookupproxy_1 | DETAIL: Key (username)=(mock:test0012) already exists.