Conditions | 2 |
Total Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 10 | ||
Bugs | 0 | Features | 0 |
1 | from django.contrib.auth import get_user_model |
||
10 | def serialize_request(request, **kwargs): |
||
11 | serializer_class = settings.SERIALIZERS.user_delete |
||
12 | context = {'request': request} |
||
13 | serializer = serializer_class(data=request.data, **{'context': context}) |
||
14 | if not serializer.is_valid(raise_exception=False): |
||
15 | raise exceptions.ValidationError(serializer.errors) |
||
16 | return {'serializer': serializer} |
||
17 | |||
33 |
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.