mirror of
https://gitlab.crans.org/bde/nk20
synced 2024-12-23 07:52:23 +00:00
BaseException.message is removed in Python 3
This commit is contained in:
parent
93bc6bb245
commit
1ca5133026
@ -82,7 +82,7 @@ class AliasViewSet(ReadProtectedModelViewSet):
|
||||
try:
|
||||
self.perform_destroy(instance)
|
||||
except ValidationError as e:
|
||||
return Response({e.code: e.message}, status.HTTP_400_BAD_REQUEST)
|
||||
return Response({e.code: str(e)}, status.HTTP_400_BAD_REQUEST)
|
||||
return Response(status=status.HTTP_204_NO_CONTENT)
|
||||
|
||||
def get_queryset(self):
|
||||
|
Loading…
Reference in New Issue
Block a user