Changes between Initial Version and Version 1 of Ticket #35848, comment 8


Ignore:
Timestamp:
Oct 17, 2024, 7:56:38 AM (4 weeks ago)
Author:
Андрей

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35848, comment 8

    initial v1  
    11The error falls from serializer.is_valid (it is rest_framework.exceptions.ValidationError):
    22
     3{{{
    34>>> from directories.views import MyModelViewSet
    45>>> viewset = MyModelViewSet()
     
    1011  File "....venv\Lib\site-packages\rest_framework\serializers.py", line 231, in is_valid
    1112    raise ValidationError(self.errors)
    12 rest_framework.exceptions.ValidationError: {'name': [ErrorDetail(string='my model with this Name already exists.', code='unique')]}
     13rest_framework.exception
     14s.ValidationError: {'name': [ErrorDetail(string='my model with this Name already exists.', code='unique')]}
     15}}}
Back to Top