From c3c678fdc11074813c6dde74e53af29874fbaa1b Mon Sep 17 00:00:00 2001 From: tomolopolis Date: Fri, 4 Aug 2023 09:41:01 +0100 Subject: [PATCH] CU-862hxw03e: remove prev bad merge view endpoint --- webapp/api/api/views.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/webapp/api/api/views.py b/webapp/api/api/views.py index 8e2071c5..671986ef 100644 --- a/webapp/api/api/views.py +++ b/webapp/api/api/views.py @@ -602,24 +602,6 @@ def search_solr(request): return search_collection(cdbs, query) -@api_view(http_method_names=['DELETE', 'POST']) -def cache_model(request, p_id): - method = request.method - project = ProjectAnnotateEntities.objects.get(id=p_id) - cat = get_cached_medcat(CAT_MAP=CAT_MAP, project=project) - if method == 'POST': - if cat is None: - get_medcat(CDB_MAP=CDB_MAP, VOCAB_MAP=VOCAB_MAP, - CAT_MAP=CAT_MAP, project=project) - return Response({'result': f'Successfully loaded model for project:{p_id}'}) - else: - return Response({'result': f'Model already loaded for project:{p_id}'}) - else: - clear_cached_medcat(CAT_MAP, project) - logger.info(f'Cleared cached model{p_id}') - return Response({'result': f'Cleared cached model:{p_id}'}) - - @api_view(http_method_names=['POST']) def upload_deployment(request): deployment_upload = request.data