Merge pull request #39 from plers-org/sm/#32

Sm/#32
This commit is contained in:
NKEY
2025-04-28 21:56:18 +09:00
committed by GitHub
2 changed files with 2 additions and 0 deletions

View File

@@ -57,6 +57,7 @@ class PortfolioSetRepresentAPIView(APIView):
if before_represent := Portfolio.objects.filter(owner=user, is_represent=True).first():
before_represent.is_represent = False
portfolio.is_represent = True
portfolio.save()
return Response({"message": "change represent success"}, status=status.HTTP_200_OK)

View File

@@ -86,6 +86,7 @@ class ProjectSetRepresentAPIView(APIView):
if before_represent := Project.objects.filter(owner=user, is_represent=True).first():
before_represent.is_represent = False
project.is_represent = True
project.save()
return Response({"message": "change represent success"}, status=status.HTTP_200_OK)