MCPcopy Create free account
hub / github.com/HumanSignal/label-studio / post

Method post

label_studio/projects/api.py:549–558  ·  view source on GitHub ↗
(self, request, *args, **kwargs)

Source from the content-addressed store, hash-verified

547 queryset = Project.objects.all()
548
549 def post(self, request, *args, **kwargs):
550 project = self.get_object()
551 label_config = self.request.data.get('label_config')
552 if not label_config:
553 raise RestValidationError('Label config is not set or is empty')
554
555 # check new config includes meaningful changes
556 has_changed = config_essential_data_has_changed(label_config, project.label_config)
557 project.validate_config(label_config, strict=True)
558 return Response({'config_essential_data_has_changed': has_changed}, status=status.HTTP_200_OK)
559
560 @extend_schema(exclude=True)
561 def get(self, request, *args, **kwargs):

Callers

nothing calls this directly

Calls 4

validate_configMethod · 0.80
get_objectMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected