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

Method patch

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

Source from the content-addressed store, hash-verified

402
403 @api_webhook(WebhookAction.PROJECT_UPDATED)
404 def patch(self, request, *args, **kwargs):
405 project = self.get_object()
406 label_config = self.request.data.get('label_config')
407
408 # config changes can break view, so we need to reset them
409 if label_config:
410 try:
411 _has_changes = config_essential_data_has_changed(label_config, project.label_config)
412 except KeyError:
413 pass
414
415 return super(ProjectAPI, self).patch(request, *args, **kwargs)
416
417 def perform_destroy(self, instance):
418 # we don't need to relaculate counters if we delete whole project

Callers

nothing calls this directly

Calls 3

get_objectMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected