Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Traceback (most recent call last):
- File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/backends/utils.py", line 86, in _execute
- return self.cursor.execute(sql, params)
- psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "doctors_pkey"
- DETAIL: Key (id)=(24) already exists.
- The above exception was the direct cause of the following exception:
- Traceback (most recent call last):
- File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
- response = get_response(request)
- File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
- response = self.process_exception_by_middleware(e, request)
- File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response
- response = wrapped_callback(request, *callback_args, **callback_kwargs)
- File "/home/alexander/registrations_api/registration_center/Doctor_at_home/registration/views.py", line 1520, in add_a_doctor
- password = password
- File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/models/manager.py", line 82, in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
- File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/models/query.py", line 433, in create
- obj.save(force_insert=True, using=self.db)
- File "/home/alexander/registrations_api/registration_center/Doctor_at_home/registration/models.py", line 261, in save
- super(Doctor, self).save(*args, **kwargs)
- File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/models/base.py", line 746, in save
- force_update=force_update, update_fields=update_fields)
- File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/models/base.py", line 784, in save_base
- force_update, using, update_fields,
- File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/models/base.py", line 887, in _save_table
- results = self._do_insert(cls._base_manager, using, fields, returning_fields, raw)
- File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/models/base.py", line 926, in _do_insert
- using=using, raw=raw,
- File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/models/manager.py", line 82, in manager_method
- return getattr(self.get_queryset(), name)(*args, **kwargs)
- File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/models/query.py", line 1204, in _insert
- return query.get_compiler(using=using).execute_sql(returning_fields)
- File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1392, in execute_sql
- cursor.execute(sql, params)
- File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/backends/utils.py", line 100, in execute
- return super().execute(sql, params)
- File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/backends/utils.py", line 68, in execute
- return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
- File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/backends/utils.py", line 77, in _execute_with_wrappers
- return executor(sql, params, many, context)
- File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/backends/utils.py", line 86, in _execute
- return self.cursor.execute(sql, params)
- File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/utils.py", line 90, in __exit__
- raise dj_exc_value.with_traceback(traceback) from exc_value
- File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/backends/utils.py", line 86, in _execute
- return self.cursor.execute(sql, params)
- django.db.utils.IntegrityError: duplicate key value violates unique constraint "doctors_pkey"
- DETAIL: Key (id)=(24) already exists.
Add Comment
Please, Sign In to add comment