@@ -57,6 +57,7 @@ class PortfolioSetRepresentAPIView(APIView):
|
|||||||
if before_represent := Portfolio.objects.filter(owner=user, is_represent=True).first():
|
if before_represent := Portfolio.objects.filter(owner=user, is_represent=True).first():
|
||||||
before_represent.is_represent = False
|
before_represent.is_represent = False
|
||||||
portfolio.is_represent = True
|
portfolio.is_represent = True
|
||||||
|
portfolio.save()
|
||||||
return Response({"message": "change represent success"}, status=status.HTTP_200_OK)
|
return Response({"message": "change represent success"}, status=status.HTTP_200_OK)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ class ProjectSetRepresentAPIView(APIView):
|
|||||||
if before_represent := Project.objects.filter(owner=user, is_represent=True).first():
|
if before_represent := Project.objects.filter(owner=user, is_represent=True).first():
|
||||||
before_represent.is_represent = False
|
before_represent.is_represent = False
|
||||||
project.is_represent = True
|
project.is_represent = True
|
||||||
|
project.save()
|
||||||
return Response({"message": "change represent success"}, status=status.HTTP_200_OK)
|
return Response({"message": "change represent success"}, status=status.HTTP_200_OK)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user