diff --git a/api/optimeet/groups/views.py b/api/optimeet/groups/views.py index 37764f0..6a040eb 100644 --- a/api/optimeet/groups/views.py +++ b/api/optimeet/groups/views.py @@ -75,6 +75,9 @@ def add_preference_to_group(request, group_id, user_id, format=None): except models.UserGroup.DoesNotExist: raise Http404 + except models.Group.DoesNotExist: + raise Http404 + serializer = serializers.PreferencesSerializer(data=request.data, context={"group_id":group,"user_id":user_id}) if serializer.is_valid():