some parts of product - fix custom pagination - add id to pages list

This commit is contained in:
2025-06-07 09:18:27 +03:30
parent a6cd093665
commit 627acf05a1
41 changed files with 371 additions and 4 deletions

View File

@@ -7,8 +7,9 @@ def custom_exception_handler(exc, context):
if response is not None:
response.data['status_code'] = response.status_code
response.data['message'] = response.data.get('detail', str(exc))
del response.data['detail']
if response.data.get('detail'):
response.data['message'] = response.data.get('detail', str(exc))
del response.data['detail']
else:
response = JsonResponse({'message': str(exc), 'status_code': 500})
response.status_code = 500