diff --git a/backend/sophon/core/views.py b/backend/sophon/core/views.py index a208ef8..74e0648 100644 --- a/backend/sophon/core/views.py +++ b/backend/sophon/core/views.py @@ -262,10 +262,6 @@ class ResearchGroupViewSet(WriteSophonViewSet): """ group = models.ResearchGroup.objects.get(pk=pk) - # Raise an error if the user is already in the group - if self.request.user in group.members.all(): - return Response(status=s.HTTP_409_CONFLICT) - # Raise an error if the group doesn't allow member joins if group.access != "OPEN": return Response(status=s.HTTP_403_FORBIDDEN) @@ -287,10 +283,6 @@ class ResearchGroupViewSet(WriteSophonViewSet): """ group = models.ResearchGroup.objects.get(pk=pk) - # Raise an error if the user is not in the group - if self.request.user not in group.members.all(): - return Response(status=s.HTTP_409_CONFLICT) - # Raise an error if the user is the owner of the group if self.request.user == group.owner: return Response(status=s.HTTP_403_FORBIDDEN)