Mochinov

Untitled

Nov 13th, 2020 (edited)
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 4.33 KB | None | 0 0
  1. Traceback (most recent call last):
  2.   File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/backends/utils.py", line 86, in _execute
  3.     return self.cursor.execute(sql, params)
  4. psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "doctors_pkey"
  5. DETAIL:  Key (id)=(24) already exists.
  6.  
  7.  
  8. The above exception was the direct cause of the following exception:
  9.  
  10. Traceback (most recent call last):
  11.   File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
  12.     response = get_response(request)
  13.   File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
  14.     response = self.process_exception_by_middleware(e, request)
  15.   File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response
  16.     response = wrapped_callback(request, *callback_args, **callback_kwargs)
  17.   File "/home/alexander/registrations_api/registration_center/Doctor_at_home/registration/views.py", line 1520, in add_a_doctor
  18.     password = password
  19.   File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/models/manager.py", line 82, in manager_method
  20.     return getattr(self.get_queryset(), name)(*args, **kwargs)
  21.   File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/models/query.py", line 433, in create
  22.     obj.save(force_insert=True, using=self.db)
  23.   File "/home/alexander/registrations_api/registration_center/Doctor_at_home/registration/models.py", line 261, in save
  24.     super(Doctor, self).save(*args, **kwargs)
  25.   File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/models/base.py", line 746, in save
  26.     force_update=force_update, update_fields=update_fields)
  27.   File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/models/base.py", line 784, in save_base
  28.     force_update, using, update_fields,
  29.   File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/models/base.py", line 887, in _save_table
  30.     results = self._do_insert(cls._base_manager, using, fields, returning_fields, raw)
  31.   File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/models/base.py", line 926, in _do_insert
  32.     using=using, raw=raw,
  33.   File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/models/manager.py", line 82, in manager_method
  34.     return getattr(self.get_queryset(), name)(*args, **kwargs)
  35.   File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/models/query.py", line 1204, in _insert
  36.     return query.get_compiler(using=using).execute_sql(returning_fields)
  37.   File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1392, in execute_sql
  38.     cursor.execute(sql, params)
  39.   File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/backends/utils.py", line 100, in execute
  40.     return super().execute(sql, params)
  41.   File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/backends/utils.py", line 68, in execute
  42.     return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  43.   File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/backends/utils.py", line 77, in _execute_with_wrappers
  44.     return executor(sql, params, many, context)
  45.   File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/backends/utils.py", line 86, in _execute
  46.     return self.cursor.execute(sql, params)
  47.   File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/utils.py", line 90, in __exit__
  48.     raise dj_exc_value.with_traceback(traceback) from exc_value
  49.   File "/home/alexander/.pyenv/versions/register_env_api/lib/python3.6/site-packages/django/db/backends/utils.py", line 86, in _execute
  50.     return self.cursor.execute(sql, params)
  51. django.db.utils.IntegrityError: duplicate key value violates unique constraint "doctors_pkey"
  52. DETAIL:  Key (id)=(24) already exists.
Add Comment
Please, Sign In to add comment