Advertisement
Mochinov

Untitled

Dec 11th, 2020
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.14 KB | None | 0 0
  1. Environment:
  2.  
  3.  
  4. Request Method: POST
  5. Request URL: http://176.124.136.34:5555/edit-doctor/47/5/
  6.  
  7. Django Version: 3.0.8
  8. Python Version: 3.6.1
  9. Installed Applications:
  10. ['django.contrib.admin',
  11. 'django.contrib.auth',
  12. 'django.contrib.contenttypes',
  13. 'django.contrib.sessions',
  14. 'django.contrib.messages',
  15. 'django.contrib.staticfiles',
  16. 'channels',
  17. 'trekking',
  18. 'djoser',
  19. 'rest_framework',
  20. 'registration',
  21. 'dal',
  22. 'dal_select2',
  23. 'rest_framework_json_api',
  24. 'rest_framework_jwt',
  25. 'django_filters',
  26. 'rest_framework.authtoken',
  27. 'rest_api']
  28. Installed Middleware:
  29. ['django.middleware.security.SecurityMiddleware',
  30. 'django.contrib.sessions.middleware.SessionMiddleware',
  31. 'django.middleware.common.CommonMiddleware',
  32. 'django.middleware.csrf.CsrfViewMiddleware',
  33. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  34. 'django.contrib.messages.middleware.MessageMiddleware',
  35. 'django.middleware.clickjacking.XFrameOptionsMiddleware']
  36.  
  37.  
  38.  
  39. Traceback (most recent call last):
  40. File "/home/alexander/.pyenv/versions/regenv/lib/python3.6/site-packages/django/db/models/fields/__init__.py", line 1772, in get_prep_value
  41. return int(value)
  42.  
  43. 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:
  44. File "/home/alexander/.pyenv/versions/regenv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
  45. response = get_response(request)
  46. File "/home/alexander/.pyenv/versions/regenv/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
  47. response = self.process_exception_by_middleware(e, request)
  48. File "/home/alexander/.pyenv/versions/regenv/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response
  49. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  50. File "/home/alexander/test_brance/registration_center/Doctor_at_home/registration/views.py", line 2452, in edit_doctor
  51. zone__in = [pacient.address_fk.zone] # <------- тут крч ошибка
  52. File "/home/alexander/.pyenv/versions/regenv/lib/python3.6/site-packages/django/db/models/manager.py", line 82, in manager_method
  53. return getattr(self.get_queryset(), name)(*args, **kwargs)
  54. File "/home/alexander/.pyenv/versions/regenv/lib/python3.6/site-packages/django/db/models/query.py", line 404, in get
  55. clone = self._chain() if self.query.combinator else self.filter(*args, **kwargs)
  56. File "/home/alexander/.pyenv/versions/regenv/lib/python3.6/site-packages/django/db/models/query.py", line 904, in filter
  57. return self._filter_or_exclude(False, *args, **kwargs)
  58. File "/home/alexander/.pyenv/versions/regenv/lib/python3.6/site-packages/django/db/models/query.py", line 923, in _filter_or_exclude
  59. clone.query.add_q(Q(*args, **kwargs))
  60. File "/home/alexander/.pyenv/versions/regenv/lib/python3.6/site-packages/django/db/models/sql/query.py", line 1354, in add_q
  61. clause, _ = self._add_q(q_object, self.used_aliases)
  62. File "/home/alexander/.pyenv/versions/regenv/lib/python3.6/site-packages/django/db/models/sql/query.py", line 1385, in _add_q
  63. check_filterable=check_filterable,
  64. File "/home/alexander/.pyenv/versions/regenv/lib/python3.6/site-packages/django/db/models/sql/query.py", line 1315, in build_filter
  65. condition = self.build_lookup(lookups, col, value)
  66. File "/home/alexander/.pyenv/versions/regenv/lib/python3.6/site-packages/django/db/models/sql/query.py", line 1169, in build_lookup
  67. lookup = lookup_class(lhs, rhs)
  68. File "/home/alexander/.pyenv/versions/regenv/lib/python3.6/site-packages/django/db/models/lookups.py", line 22, in __init__
  69. self.rhs = self.get_prep_lookup()
  70. File "/home/alexander/.pyenv/versions/regenv/lib/python3.6/site-packages/django/db/models/fields/related_lookups.py", line 115, in get_prep_lookup
  71. self.rhs = target_field.get_prep_value(self.rhs)
  72. File "/home/alexander/.pyenv/versions/regenv/lib/python3.6/site-packages/django/db/models/fields/__init__.py", line 1776, in get_prep_value
  73. ) from e
  74.  
  75. Exception Type: TypeError at /edit-doctor/47/5/
  76. Exception Value: Field 'id' expected a number but got ['1'].
  77.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement