🐛 Fix: [#32] portfolio 이전 대표 내리기 save() 추가
This commit is contained in:
@@ -56,6 +56,7 @@ class PortfolioSetRepresentAPIView(APIView):
|
||||
return Response({"message": "Not owner"}, status=status.HTTP_403_FORBIDDEN)
|
||||
if before_represent := Portfolio.objects.filter(owner=user, is_represent=True).first():
|
||||
before_represent.is_represent = False
|
||||
before_represent.save()
|
||||
portfolio.is_represent = True
|
||||
portfolio.save()
|
||||
return Response({"message": "change represent success"}, status=status.HTTP_200_OK)
|
||||
|
||||
Reference in New Issue
Block a user