Skip to content

🐛 Route link-configuration Error 500 #1748

@AntoLC

Description

@AntoLC

Bug Report

def link_configuration(self, request, *args, **kwargs):
"""Update link configuration with specific rights (cf get_abilities)."""
# Check permissions first
document = self.get_object()
# Deserialize and validate the data
serializer = serializers.LinkDocumentSerializer(
document, data=request.data, partial=True
)
serializer.is_valid(raise_exception=True)
serializer.save()
# Notify collaboration server about the link updated
CollaborationService().reset_connections(str(document.id))
return drf.response.Response(serializer.data, status=drf.status.HTTP_200_OK)

If the communication with the collaboration server has a problem (CollaborationService().reset_connections(str(document.id))), we get a error 500, but changing the configuration succeeded, so we should get a 200 even if the reset_connection failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions