Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Environment:
- Request Method: POST
- Request URL: http://176.124.136.34:5555/edit-doctor/47/5/
- Django Version: 3.0.8
- Python Version: 3.6.1
- Installed Applications:
- ['django.contrib.admin',
- 'django.contrib.auth',
- 'django.contrib.contenttypes',
- 'django.contrib.sessions',
- 'django.contrib.messages',
- 'django.contrib.staticfiles',
- 'channels',
- 'trekking',
- 'djoser',
- 'rest_framework',
- 'registration',
- 'dal',
- 'dal_select2',
- 'rest_framework_json_api',
- 'rest_framework_jwt',
- 'django_filters',
- 'rest_framework.authtoken',
- 'rest_api']
- Installed Middleware:
- ['django.middleware.security.SecurityMiddleware',
- 'django.contrib.sessions.middleware.SessionMiddleware',
- 'django.middleware.common.CommonMiddleware',
- 'django.middleware.csrf.CsrfViewMiddleware',
- 'django.contrib.auth.middleware.AuthenticationMiddleware',
- 'django.contrib.messages.middleware.MessageMiddleware',
- 'django.middleware.clickjacking.XFrameOptionsMiddleware']
- Traceback (most recent call last):
- File "/home/alexander/.pyenv/versions/regenv/lib/python3.6/site-packages/django/db/models/fields/__init__.py", line 1772, in get_prep_value
- return int(value)
- The above exception (int() argument must be a string, a bytes-like object or a number, not 'list') was the direct cause of the following exception:
- File "/home/alexander/.pyenv/versions/regenv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
- response = get_response(request)
- File "/home/alexander/.pyenv/versions/regenv/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/regenv/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/test_brance/registration_center/Doctor_at_home/registration/views.py", line 2452, in edit_doctor
- zone__in = [pacient.address_fk.zone] # <------- тут крч ошибка
- File "/home/alexander/.pyenv/versions/regenv/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/regenv/lib/python3.6/site-packages/django/db/models/query.py", line 404, in get
- clone = self._chain() if self.query.combinator else self.filter(*args, **kwargs)
- File "/home/alexander/.pyenv/versions/regenv/lib/python3.6/site-packages/django/db/models/query.py", line 904, in filter
- return self._filter_or_exclude(False, *args, **kwargs)
- File "/home/alexander/.pyenv/versions/regenv/lib/python3.6/site-packages/django/db/models/query.py", line 923, in _filter_or_exclude
- clone.query.add_q(Q(*args, **kwargs))
- File "/home/alexander/.pyenv/versions/regenv/lib/python3.6/site-packages/django/db/models/sql/query.py", line 1354, in add_q
- clause, _ = self._add_q(q_object, self.used_aliases)
- File "/home/alexander/.pyenv/versions/regenv/lib/python3.6/site-packages/django/db/models/sql/query.py", line 1385, in _add_q
- check_filterable=check_filterable,
- File "/home/alexander/.pyenv/versions/regenv/lib/python3.6/site-packages/django/db/models/sql/query.py", line 1315, in build_filter
- condition = self.build_lookup(lookups, col, value)
- File "/home/alexander/.pyenv/versions/regenv/lib/python3.6/site-packages/django/db/models/sql/query.py", line 1169, in build_lookup
- lookup = lookup_class(lhs, rhs)
- File "/home/alexander/.pyenv/versions/regenv/lib/python3.6/site-packages/django/db/models/lookups.py", line 22, in __init__
- self.rhs = self.get_prep_lookup()
- File "/home/alexander/.pyenv/versions/regenv/lib/python3.6/site-packages/django/db/models/fields/related_lookups.py", line 115, in get_prep_lookup
- self.rhs = target_field.get_prep_value(self.rhs)
- File "/home/alexander/.pyenv/versions/regenv/lib/python3.6/site-packages/django/db/models/fields/__init__.py", line 1776, in get_prep_value
- ) from e
- Exception Type: TypeError at /edit-doctor/47/5/
- Exception Value: Field 'id' expected a number but got ['1'].
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement